Skip to content

Commit

Permalink
chore: Update dev-deps, add devcontainer, add mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
btorresgil committed Jan 18, 2024
1 parent 7c60f88 commit f81e27d
Show file tree
Hide file tree
Showing 5 changed files with 864 additions and 437 deletions.
40 changes: 40 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
"image": "mcr.microsoft.com/devcontainers/python:1-3.9-bullseye",
"features": {
"ghcr.io/devcontainers-contrib/features/poetry:2": {
"version": "latest"
},
"ghcr.io/dhoeric/features/google-cloud-cli:1": {}
},
"postCreateCommand": "poetry install",
"customizations": {
"vscode": {
"extensions": [
// Python
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.black-formatter",
"ms-python.flake8",
"matangover.mypy",
"nwgh.bandit",
"KevinRose.vsc-python-indent",
// RestructuredText
"lextudio.restructuredtext",
"trond-snekvik.simple-rst",
// Helpers
"tamasfe.even-better-toml",
"njpwerner.autodocstring",
"aaron-bond.better-comments",
// Tools
"github.vscode-github-actions",
"GitHub.copilot",
"ms-toolsai.jupyter",
// VIM
"vscodevim.vim"
]
}
}
}
28 changes: 14 additions & 14 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,14 @@
"**/__pycache__": true
},
"editor.codeActionsOnSave": {
"source.organizeImports": true
"source.organizeImports": "explicit"
},
"python.testing.unittestEnabled": false,
"python.testing.nosetestsEnabled": false,
"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": ["--no-cov"],
"python.linting.enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.banditEnabled": true,
"python.linting.banditArgs": ["-r", "--ini .bandit"],
"python.linting.flake8Enabled": true,
"python.linting.flake8CategorySeverity.E": "Warning",
"python.linting.mypyEnabled": false,
"python.formatting.provider": "black",
"python.testing.pytestArgs": [
"--no-cov"
],
"editor.formatOnSave": true,
"restructuredtext.confPath": "${workspaceFolder}/docs",
"cSpell.words": [
"Vlan",
"etree",
Expand All @@ -27,5 +19,13 @@
"pandevice",
"pan-os-python",
"refreshall"
]
}
],
"black-formatter.importStrategy": "fromEnvironment",
"bandit.importStrategy": "fromEnvironment",
"bandit.args": [
"-r",
"--ini .bandit"
],
"flake8.importStrategy": "fromEnvironment",
"flake8.args": ["--config=.flake8"]
}
36 changes: 36 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Global options:

[mypy]
ignore_missing_imports = True
; follow_imports = silent
show_column_numbers = True
warn_unused_configs = False
disallow_subclassing_any = False
disallow_any_generics = False
disallow_untyped_calls = False
disallow_untyped_defs = False
disallow_incomplete_defs = False
check_untyped_defs = True
disallow_untyped_decorators = False
no_implicit_optional = False
warn_redundant_casts = False
warn_unused_ignores = False
warn_return_any = False

# Per-module options:

## In this section, add overrides for specific files, modules, or functions
## that don't yet have type annotations. For example:
## [mypy-older_module.older_file]
## disallow_untyped_defs = False

[mypy-panos.updater]
disallow_subclassing_any = True
disallow_any_generics = True
disallow_untyped_defs = False
disallow_incomplete_defs = True
check_untyped_defs = True
disallow_untyped_decorators = True
no_implicit_optional = True
warn_unused_ignores = True
warn_return_any = True
Loading

0 comments on commit f81e27d

Please sign in to comment.