Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}
},
"postCreateCommand": {
"pre-commit": "pre-commit install --hook-type commit-msg --hook-type pre-commit --hook-type pre-push",
"pre-commit": "pre-commit install --hook-type pre-commit --hook-type commit-msg --hook-type pre-push",
"dev-requirements": "python2 -m pip install --requirement requirements.txt"
}
}
}
11 changes: 7 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
trim_trailing_whitespace = true

[*.{ini,json,md,toml,yaml,yml}]
[*.{json}]
indent_size = 2
insert_final_newline = false

[*.{md,toml,yaml,yml}]
indent_size = 2
indent_style = space
insert_final_newline = true

[*.{py,pyi}]
[*.{ini,py,pyi}]
indent_size = 4
indent_style = space
insert_final_newline = true
221 changes: 189 additions & 32 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,143 @@
# Editors
.idea/
.vscode/
# Created by https://www.toptal.com/developers/gitignore/api/linux,macos,pycharm+all,python,visualstudiocode,windows
# Edit at https://www.toptal.com/developers/gitignore?templates=linux,macos,pycharm+all,python,visualstudiocode,windows

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### macOS Patch ###
# iCloud generated files
*.icloud

### PyCharm+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### PyCharm+all Patch ###
# Ignore everything but code style settings and run configurations
# that are supposed to be shared within teams.

.idea/*

!.idea/codeStyles
!.idea/runConfigurations

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -82,17 +218,14 @@ target/
# Jupyter Notebook
.ipynb_checkpoints

# Jython
.jython_cache/

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
.python-version
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
Expand All @@ -101,7 +234,22 @@ ipython_config.py
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
Expand Down Expand Up @@ -144,36 +292,43 @@ dmypy.json
# Cython debug symbols
cython_debug/

# macOS
# General
.DS_Store
.AppleDouble
.LSOverride
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Icon must end with two \r
Icon
### Python Patch ###
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
poetry.toml

# ruff
.ruff_cache/

# Thumbnails
._*
# LSP config files
pyrightconfig.json

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

# Windows
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
Expand All @@ -198,3 +353,5 @@ $RECYCLE.BIN/

# Windows shortcuts
*.lnk

# End of https://www.toptal.com/developers/gitignore/api/linux,macos,pycharm+all,python,visualstudiocode,windows
2 changes: 1 addition & 1 deletion .mypy.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[mypy]
python_version = 2.7
mypy_path = $MYPY_CONFIG_FILE_DIR/src
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): Changing mypy_path to a relative path may break setups that rely on config-relative resolution.

Using mypy_path = src makes resolution depend on the current working directory rather than the config file location, so running mypy from other directories (IDEs, CI, pre-commit) may fail to resolve imports. If you want consistent behavior across environments, prefer keeping $MYPY_CONFIG_FILE_DIR/src or an equivalent config-relative path.

mypy_path = src
strict = true
enable_error_code = ignore-without-code
14 changes: 6 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ repos:
rev: v1.3.0
hooks:
- id: sort-all
name: sort-all
files: ^src/
- repo: https://github.com/bwhmather/ssort
rev: 0.16.0
Expand All @@ -25,14 +26,11 @@ repos:
- id: isort
name: isort-package
files: ^src/
args: [--settings-file, tox.ini]
- repo: https://github.com/PyCQA/isort
rev: 8.0.1
hooks:
args: [--settings-file=tox.ini]
- id: isort
name: isort-stubs
files: ^stubs/stubs/
args: [--settings-file, stubs/tox.ini]
args: [--settings-file=stubs/tox.ini]
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.7
hooks:
Expand All @@ -45,8 +43,8 @@ repos:
hooks:
- id: flake8
name: flake8-package
args: [--config=tox.ini]
files: ^src/
args: [--config, tox.ini]
additional_dependencies: [pydoclint]
language_version: python3.12
- repo: https://github.com/PyCQA/flake8
Expand All @@ -57,14 +55,14 @@ repos:
types: [file]
files: \.(pyi)$
additional_dependencies: [flake8-pyi]
args: [--config, stubs/tox.ini]
args: [--config=stubs/tox.ini]
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
files: ^src/
exclude: ^src/(ch|com|org)/
args: [--config, tox.ini]
args: [--config=tox.ini]
- repo: https://github.com/commitizen-tools/commitizen
rev: v4.13.9
hooks:
Expand Down
29 changes: 16 additions & 13 deletions .sourcery.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
version: "1"

ignore:
- .git
- venv
- .venv
- env
- .env
- .tox
- .git
- venv
- .venv
- env
- .env
- .tox
- node_modules
- vendor

rule_settings:
enable:
- default
disable:
- avoid-builtin-shadow
enable: [default]
disable: []
rule_types:
- refactoring
- suggestion
- comment
python_version: "3.3"
python_version: '3.3'

rules: []

metrics:
quality_threshold: 25.0
Expand All @@ -33,3 +33,6 @@ clone_detection:
min_lines: 3
min_duplicates: 2
identical_clones_only: false

proxy:
no_ssl_verify: false
Loading