Skip to content

Commit 4b8f619

Browse files
committed
refact: standard prefix for classes and consts
1 parent cd34018 commit 4b8f619

22 files changed

+595
-515
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@ main.dSYM/
1313

1414
.idea
1515
SqliteCloud.egg-info
16-
src/sqlitecloud/libsqcloud.so
1716

1817
playground.ipynb

bandit-baseline.json

Lines changed: 93 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"errors": [],
3-
"generated_at": "2024-05-23T09:59:11Z",
3+
"generated_at": "2024-06-03T07:52:17Z",
44
"metrics": {
55
"_totals": {
66
"CONFIDENCE.HIGH": 0.0,
@@ -11,7 +11,7 @@
1111
"SEVERITY.LOW": 1.0,
1212
"SEVERITY.MEDIUM": 2.0,
1313
"SEVERITY.UNDEFINED": 0.0,
14-
"loc": 2096,
14+
"loc": 3405,
1515
"nosec": 0
1616
},
1717
"src/setup.py": {
@@ -23,7 +23,7 @@
2323
"SEVERITY.LOW": 0.0,
2424
"SEVERITY.MEDIUM": 0.0,
2525
"SEVERITY.UNDEFINED": 0.0,
26-
"loc": 39,
26+
"loc": 29,
2727
"nosec": 0
2828
},
2929
"src/sqlitecloud/__init__.py": {
@@ -35,7 +35,7 @@
3535
"SEVERITY.LOW": 0.0,
3636
"SEVERITY.MEDIUM": 0.0,
3737
"SEVERITY.UNDEFINED": 0.0,
38-
"loc": 1,
38+
"loc": 3,
3939
"nosec": 0
4040
},
4141
"src/sqlitecloud/client.py": {
@@ -47,10 +47,10 @@
4747
"SEVERITY.LOW": 0.0,
4848
"SEVERITY.MEDIUM": 0.0,
4949
"SEVERITY.UNDEFINED": 0.0,
50-
"loc": 119,
50+
"loc": 104,
5151
"nosec": 0
5252
},
53-
"src/sqlitecloud/conn_info.py": {
53+
"src/sqlitecloud/dbapi2.py": {
5454
"CONFIDENCE.HIGH": 0.0,
5555
"CONFIDENCE.LOW": 0.0,
5656
"CONFIDENCE.MEDIUM": 0.0,
@@ -59,7 +59,7 @@
5959
"SEVERITY.LOW": 0.0,
6060
"SEVERITY.MEDIUM": 0.0,
6161
"SEVERITY.UNDEFINED": 0.0,
62-
"loc": 6,
62+
"loc": 377,
6363
"nosec": 0
6464
},
6565
"src/sqlitecloud/download.py": {
@@ -83,7 +83,7 @@
8383
"SEVERITY.LOW": 0.0,
8484
"SEVERITY.MEDIUM": 0.0,
8585
"SEVERITY.UNDEFINED": 0.0,
86-
"loc": 727,
86+
"loc": 765,
8787
"nosec": 0
8888
},
8989
"src/sqlitecloud/pubsub.py": {
@@ -107,7 +107,7 @@
107107
"SEVERITY.LOW": 0.0,
108108
"SEVERITY.MEDIUM": 0.0,
109109
"SEVERITY.UNDEFINED": 0.0,
110-
"loc": 62,
110+
"loc": 80,
111111
"nosec": 0
112112
},
113113
"src/sqlitecloud/types.py": {
@@ -119,7 +119,7 @@
119119
"SEVERITY.LOW": 1.0,
120120
"SEVERITY.MEDIUM": 0.0,
121121
"SEVERITY.UNDEFINED": 0.0,
122-
"loc": 143,
122+
"loc": 194,
123123
"nosec": 0
124124
},
125125
"src/sqlitecloud/upload.py": {
@@ -155,7 +155,7 @@
155155
"SEVERITY.LOW": 0.0,
156156
"SEVERITY.MEDIUM": 0.0,
157157
"SEVERITY.UNDEFINED": 0.0,
158-
"loc": 22,
158+
"loc": 35,
159159
"nosec": 0
160160
},
161161
"src/tests/integration/__init__.py": {
@@ -179,7 +179,19 @@
179179
"SEVERITY.LOW": 0.0,
180180
"SEVERITY.MEDIUM": 0.0,
181181
"SEVERITY.UNDEFINED": 0.0,
182-
"loc": 471,
182+
"loc": 492,
183+
"nosec": 0
184+
},
185+
"src/tests/integration/test_dbapi2.py": {
186+
"CONFIDENCE.HIGH": 0.0,
187+
"CONFIDENCE.LOW": 0.0,
188+
"CONFIDENCE.MEDIUM": 0.0,
189+
"CONFIDENCE.UNDEFINED": 0.0,
190+
"SEVERITY.HIGH": 0.0,
191+
"SEVERITY.LOW": 0.0,
192+
"SEVERITY.MEDIUM": 0.0,
193+
"SEVERITY.UNDEFINED": 0.0,
194+
"loc": 181,
183195
"nosec": 0
184196
},
185197
"src/tests/integration/test_download.py": {
@@ -206,6 +218,18 @@
206218
"loc": 18,
207219
"nosec": 0
208220
},
221+
"src/tests/integration/test_pandas.py": {
222+
"CONFIDENCE.HIGH": 0.0,
223+
"CONFIDENCE.LOW": 0.0,
224+
"CONFIDENCE.MEDIUM": 0.0,
225+
"CONFIDENCE.UNDEFINED": 0.0,
226+
"SEVERITY.HIGH": 0.0,
227+
"SEVERITY.LOW": 0.0,
228+
"SEVERITY.MEDIUM": 0.0,
229+
"SEVERITY.UNDEFINED": 0.0,
230+
"loc": 50,
231+
"nosec": 0
232+
},
209233
"src/tests/integration/test_pubsub.py": {
210234
"CONFIDENCE.HIGH": 0.0,
211235
"CONFIDENCE.LOW": 1.0,
@@ -215,7 +239,19 @@
215239
"SEVERITY.LOW": 0.0,
216240
"SEVERITY.MEDIUM": 1.0,
217241
"SEVERITY.UNDEFINED": 0.0,
218-
"loc": 109,
242+
"loc": 118,
243+
"nosec": 0
244+
},
245+
"src/tests/integration/test_sqlite3_parity.py": {
246+
"CONFIDENCE.HIGH": 0.0,
247+
"CONFIDENCE.LOW": 0.0,
248+
"CONFIDENCE.MEDIUM": 0.0,
249+
"CONFIDENCE.UNDEFINED": 0.0,
250+
"SEVERITY.HIGH": 0.0,
251+
"SEVERITY.LOW": 0.0,
252+
"SEVERITY.MEDIUM": 0.0,
253+
"SEVERITY.UNDEFINED": 0.0,
254+
"loc": 176,
219255
"nosec": 0
220256
},
221257
"src/tests/integration/test_upload.py": {
@@ -242,6 +278,18 @@
242278
"loc": 48,
243279
"nosec": 0
244280
},
281+
"src/tests/unit/test_dbapi2.py": {
282+
"CONFIDENCE.HIGH": 0.0,
283+
"CONFIDENCE.LOW": 0.0,
284+
"CONFIDENCE.MEDIUM": 0.0,
285+
"CONFIDENCE.UNDEFINED": 0.0,
286+
"SEVERITY.HIGH": 0.0,
287+
"SEVERITY.LOW": 0.0,
288+
"SEVERITY.MEDIUM": 0.0,
289+
"SEVERITY.UNDEFINED": 0.0,
290+
"loc": 242,
291+
"nosec": 0
292+
},
245293
"src/tests/unit/test_driver.py": {
246294
"CONFIDENCE.HIGH": 0.0,
247295
"CONFIDENCE.LOW": 0.0,
@@ -251,7 +299,7 @@
251299
"SEVERITY.LOW": 0.0,
252300
"SEVERITY.MEDIUM": 0.0,
253301
"SEVERITY.UNDEFINED": 0.0,
254-
"loc": 76,
302+
"loc": 188,
255303
"nosec": 0
256304
},
257305
"src/tests/unit/test_resultset.py": {
@@ -263,32 +311,32 @@
263311
"SEVERITY.LOW": 0.0,
264312
"SEVERITY.MEDIUM": 0.0,
265313
"SEVERITY.UNDEFINED": 0.0,
266-
"loc": 77,
314+
"loc": 113,
315+
"nosec": 0
316+
},
317+
"src/tests/unit/test_types.py": {
318+
"CONFIDENCE.HIGH": 0.0,
319+
"CONFIDENCE.LOW": 0.0,
320+
"CONFIDENCE.MEDIUM": 0.0,
321+
"CONFIDENCE.UNDEFINED": 0.0,
322+
"SEVERITY.HIGH": 0.0,
323+
"SEVERITY.LOW": 0.0,
324+
"SEVERITY.MEDIUM": 0.0,
325+
"SEVERITY.UNDEFINED": 0.0,
326+
"loc": 14,
267327
"nosec": 0
268328
}
269329
},
270330
"results": [
271331
{
272-
"code": "95 class SqliteCloudAccount:\n96 def __init__(\n97 self,\n98 username: Optional[str] = \"\",\n99 password: Optional[str] = \"\",\n100 hostname: Optional[str] = \"\",\n101 dbname: Optional[str] = \"\",\n102 port: Optional[int] = SQCLOUD_DEFAULT.PORT.value,\n103 apikey: Optional[str] = \"\",\n104 ) -> None:\n105 # User name is required unless connectionstring is provided\n106 self.username = username\n107 # Password is required unless connection string is provided\n108 self.password = password\n109 # Password is hashed\n110 self.password_hashed = False\n111 # API key instead of username and password\n112 self.apikey = apikey\n113 # Name of database to open\n114 self.dbname = dbname\n115 # Like mynode.sqlitecloud.io\n116 self.hostname = hostname\n117 self.port = port\n118 \n",
332+
"code": "107 class SQLiteCloudAccount:\n108 def __init__(\n109 self,\n110 username: Optional[str] = \"\",\n111 password: Optional[str] = \"\",\n112 hostname: str = \"\",\n113 dbname: Optional[str] = \"\",\n114 port: int = SQLITECLOUD_DEFAULT.PORT.value,\n115 apikey: Optional[str] = \"\",\n116 ) -> None:\n117 # User name is required unless connectionstring is provided\n118 self.username = username\n119 # Password is required unless connection string is provided\n120 self.password = password\n121 # Password is hashed\n122 self.password_hashed = False\n123 # API key instead of username and password\n124 self.apikey = apikey\n125 # Name of database to open\n126 self.dbname = dbname\n127 # Like mynode.sqlitecloud.io\n128 self.hostname = hostname\n129 self.port = port\n130 \n",
273333
"col_offset": 4,
274334
"filename": "src/sqlitecloud/types.py",
275335
"issue_confidence": "MEDIUM",
276336
"issue_severity": "LOW",
277337
"issue_text": "Possible hardcoded password: ''",
278-
"line_number": 96,
338+
"line_number": 108,
279339
"line_range": [
280-
96,
281-
97,
282-
98,
283-
99,
284-
100,
285-
101,
286-
102,
287-
103,
288-
104,
289-
105,
290-
106,
291-
107,
292340
108,
293341
109,
294342
110,
@@ -298,22 +346,34 @@
298346
114,
299347
115,
300348
116,
301-
117
349+
117,
350+
118,
351+
119,
352+
120,
353+
121,
354+
122,
355+
123,
356+
124,
357+
125,
358+
126,
359+
127,
360+
128,
361+
129
302362
],
303363
"more_info": "https://bandit.readthedocs.io/en/latest/plugins/b107_hardcoded_password_default.html",
304364
"test_id": "B107",
305365
"test_name": "hardcoded_password_default"
306366
},
307367
{
308-
"code": "155 client.exec_query(\n156 f\"UPDATE genres SET Name = '{new_name}' WHERE GenreId = 1;\", connection\n157 )\n",
368+
"code": "164 client.exec_query(\n165 f\"UPDATE genres SET Name = '{new_name}' WHERE GenreId = 1;\", connection\n166 )\n",
309369
"col_offset": 12,
310370
"filename": "src/tests/integration/test_pubsub.py",
311371
"issue_confidence": "LOW",
312372
"issue_severity": "MEDIUM",
313373
"issue_text": "Possible SQL injection vector through string-based query construction.",
314-
"line_number": 156,
374+
"line_number": 165,
315375
"line_range": [
316-
156
376+
165
317377
],
318378
"more_info": "https://bandit.readthedocs.io/en/latest/plugins/b608_hardcoded_sql_expressions.html",
319379
"test_id": "B608",

src/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
long_description = (Path(__file__).parent / "README.md").read_text()
88

99
setup(
10-
name="SqliteCloud",
10+
name="sqlitecloud",
1111
version="0.0.77",
1212
author="sqlitecloud.io",
1313
description="A Python package for working with SQLite databases in the cloud.",

0 commit comments

Comments
 (0)