Skip to content

Commit 0352ef8

Browse files
2 parents e1e6687 + 1decf75 commit 0352ef8

File tree

3 files changed

+41
-18
lines changed

3 files changed

+41
-18
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
fail_fast: true
2-
verbose: true
32

43
repos:
54
# checks for secrets via rules (gitleaks.toml)
@@ -26,6 +25,10 @@ repos:
2625
- id: check-added-large-files
2726
args: ['--maxkb=1024']
2827
- id: check-docstring-first
28+
exclude: |
29+
(?x)^(
30+
hello.py
31+
)$
2932
- id: check-executables-have-shebangs
3033
- id: check-merge-conflict
3134
- id: check-shebang-scripts-are-executable
@@ -43,8 +46,10 @@ repos:
4346
- id: pretty-format-json
4447
# https://pre-commit.com/#regular-expressions
4548
exclude: |
46-
^launch.json$
47-
^settings.json$
49+
(?x)^(
50+
.vscode/launch.json|
51+
.vscode/settings.json
52+
)$
4853
args: ['--autofix', '--indent=2', '--no-sort-keys']
4954
- id: requirements-txt-fixer
5055
# - id: trailing-whitespace

.vscode/launch.json

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,31 @@
22
// Use IntelliSense to learn about possible attributes.
33
// Hover to view descriptions of existing attributes.
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
56
// pytest: https://stackoverflow.com/questions/70259564/how-to-debug-the-current-python-test-file-with-pytest-in-vs-code
7+
68
"version": "0.2.0",
7-
"configurations": [{
8-
"name": "Python: Debug Tests",
9-
"type": "python",
10-
"request": "launch",
11-
"module": "pytest",
12-
"args": [
13-
"${file}"
14-
],
15-
"console": "integratedTerminal"
16-
}]
9+
"configurations": [
10+
{
11+
"name": "Python: Debug Tests",
12+
"type": "python",
13+
"request": "launch",
14+
"module": "pytest",
15+
"args": [
16+
"${file}"
17+
],
18+
"console": "integratedTerminal"
19+
},
20+
{
21+
"name": "Node: Current File",
22+
"type": "node",
23+
"request": "launch",
24+
"program": "${file}",
25+
"console": "integratedTerminal",
26+
"skipFiles": [
27+
"<node_internals>/**"
28+
],
29+
// "runtimeExecutable": "${env:HOME}/.n/bin/node"
30+
}
31+
]
1732
}

hello.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env python3
22

3+
# flake8: noqa
4+
35
# fmt: off
46
# import argparse
57
import arrow
@@ -29,16 +31,17 @@
2931
The commented out section is boilerplate for common operations.
3032
Feel free to uncomment and/or delete after first commit.
3133
"""
34+
3235
# env
3336
home = Path.home()
3437
cwd = Path.cwd()
35-
now = arrow.now().format('YYYYMMDD_HHmmss')
38+
now = arrow.now().format("YYYYMMDD_HHmmss")
3639
out = f"{cwd}/formatted/results_{now}.csv"
3740

38-
# env vars (hierachy: args, env, .env)
39-
HOST = config('HOST', default='localhost')
40-
USER = config('USER')
41-
PASS = config('PASS')
41+
# env vars (hierarchy: args, env, .env)
42+
HOST = config("HOST", default="localhost")
43+
USER = config("USER")
44+
PASS = config("PASS")
4245

4346
## verbose icecream
4447
# ic.configureOutput(includeContext=True)

0 commit comments

Comments
 (0)