simonw / datasette
Showing 2 of 7 files from the diff.

@@ -181,6 +181,7 @@
Loading
181 181
    async def resolve_db_name(self, request, db_name, **kwargs):
182 182
        hash = None
183 183
        name = None
184 +
        db_name = urllib.parse.unquote_plus(db_name)
184 185
        if db_name not in self.ds.databases and "-" in db_name:
185 186
            # No matching DB found, maybe it's a name-hash?
186 187
            name_bit, hash_bit = db_name.rsplit("-", 1)
@@ -191,7 +192,7 @@
Loading
191 192
                hash = hash_bit
192 193
        else:
193 194
            name = db_name
194 -
        name = urllib.parse.unquote_plus(name)
195 +
195 196
        try:
196 197
            db = self.ds.databases[name]
197 198
        except KeyError:

@@ -30,9 +30,11 @@
Loading
30 30
    def database(self, database, format=None):
31 31
        db = self.ds.databases[database]
32 32
        if self.ds.setting("hash_urls") and db.hash:
33 -
            path = self.path(f"{database}-{db.hash[:HASH_LENGTH]}", format=format)
33 +
            path = self.path(
34 +
                f"{urllib.parse.quote(database)}-{db.hash[:HASH_LENGTH]}", format=format
35 +
            )
34 36
        else:
35 -
            path = self.path(database, format=format)
37 +
            path = self.path(urllib.parse.quote(database), format=format)
36 38
        return path
37 39
38 40
    def table(self, database, table, format=None):
Files Coverage
datasette 91.54%
Project Totals (32 files) 91.54%
1
coverage:
2
  status:
3
    project:
4
      default:
5
        informational: true
6
    patch:
7
      default:
8
        informational: true
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading