Skip to content

Commit

Permalink
Fix settings changed detection + Bump dependencies:
Browse files Browse the repository at this point in the history
- Ruff to 0.1.1
- pygrabber to 0.2
- fix for pyright 1.1.323
  • Loading branch information
Avasam committed Oct 20, 2023
1 parent 79d6234 commit 1394bf0
Show file tree
Hide file tree
Showing 8 changed files with 1,833 additions and 1,833 deletions.
76 changes: 38 additions & 38 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: pretty-format-json
exclude: ".vscode/.*" # Exclude jsonc
args: [--autofix, --no-sort-keys]
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=crlf]
- id: check-case-conflict
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.10.0
hooks:
- id: pretty-format-ini
args: [--autofix]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.0.292" # Must match requirements-dev.txt
hooks:
- id: ruff
args: [--fix]
- repo: https://github.com/hhatto/autopep8
rev: "v2.0.4" # Must match requirements-dev.txt
hooks:
- id: autopep8
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0 # Must match requirements-dev.txt
hooks:
- id: add-trailing-comma

ci:
autoupdate_branch: dev
skip:
# Ignore until Linux support. We don't want lf everywhere yet
# And crlf fails on CI because pre-commit runs on linux
- "mixed-line-ending"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: pretty-format-json
exclude: ".vscode/.*" # Exclude jsonc
args: [--autofix, --no-sort-keys]
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=crlf]
- id: check-case-conflict
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.10.0
hooks:
- id: pretty-format-ini
args: [--autofix]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.1" # Must match requirements-dev.txt
hooks:
- id: ruff
args: [--fix]
- repo: https://github.com/hhatto/autopep8
rev: "v2.0.4" # Must match requirements-dev.txt
hooks:
- id: autopep8
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0 # Must match requirements-dev.txt
hooks:
- id: add-trailing-comma

ci:
autoupdate_branch: dev
skip:
# Ignore until Linux support. We don't want lf everywhere yet
# And crlf fails on CI because pre-commit runs on linux
- "mixed-line-ending"
296 changes: 148 additions & 148 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,148 +1,148 @@
{
"editor.rulers": [
80,
120
],
"[git-commit]": {
"editor.rulers": [
72
]
},
"[markdown]": {
"files.trimTrailingWhitespace": false,
},
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"editor.comments.insertSpace": true,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"editor.tabSize": 2,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true,
// Let dedicated linter (Ruff) organize imports
"source.organizeImports": false,
},
"emeraldwalk.runonsave": {
"commands": [
{
"match": "\\.pyi?",
"cmd": "add-trailing-comma ${file}"
},
]
},
"files.associations": {
".flake8": "properties",
"*.qrc": "xml",
"*.ui": "xml"
},
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/.*_cache": true, // mypy and Ruff cache
"**/__pycache__": true,
// Only show useful PyInstaller logs
"build/*.*": true,
"build/[b-z]*": true,
"build/**/localpycs": true,
"build/**/Tree-*": true,
"build/**/*.{manifest,pkg,zip,tcl,res,pyz}": true,
},
"search.exclude": {
"**/*.code-search": true,
"*.lock": true,
},
// Set the default formatter to help avoid Prettier
"[json][jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features",
},
"[python]": {
// Ruff is not yet a formatter: https://github.com/charliermarsh/ruff/issues/1904
"editor.defaultFormatter": "ms-python.autopep8",
"editor.tabSize": 4,
"editor.rulers": [
72, // PEP8-17 docstrings
// 79, // PEP8-17 default max
// 88, // Black default
// 99, // PEP8-17 acceptable max
120, // Our hard rule
],
},
"mypy-type-checker.importStrategy": "fromEnvironment",
"mypy-type-checker.args": [
// https://github.com/microsoft/vscode-mypy/issues/37#issuecomment-1602702174
"--config-file=mypy.ini",
],
"python.terminal.activateEnvironment": true,
// python.analysis is Pylance (pyright) configurations
"python.analysis.fixAll": [
"source.convertImportFormat"
// Explicitly omiting "source.unusedImports", can be annoying when commenting code for debugging
],
// Important to follow the config in pyrightconfig.json
"python.analysis.useLibraryCodeForTypes": false,
"python.analysis.diagnosticMode": "workspace",
"ruff.importStrategy": "fromEnvironment",
// Use the Ruff extension instead
"isort.check": false,
// linting/formatting options deprecated, use dedicated extensions instead
// https://github.com/microsoft/vscode-python/wiki/Migration-to-Python-Tools-Extensions
"python.linting.enabled": false,
"python.linting.banditEnabled": false,
"python.linting.flake8Enabled": false,
"python.linting.prospectorEnabled": false,
"python.linting.pycodestyleEnabled": false,
"python.linting.pylamaEnabled": false,
"python.linting.pylintEnabled": false,
"python.linting.mypyEnabled": false,
"python.formatting.provider": "none",
"powershell.codeFormatting.pipelineIndentationStyle": "IncreaseIndentationForFirstPipeline",
"powershell.codeFormatting.autoCorrectAliases": true,
"powershell.codeFormatting.trimWhitespaceAroundPipe": true,
"powershell.codeFormatting.useConstantStrings": true,
"powershell.codeFormatting.useCorrectCasing": true,
"powershell.codeFormatting.whitespaceBetweenParameters": true,
"powershell.integratedConsole.showOnStartup": false,
"terminal.integrated.defaultProfile.windows": "PowerShell",
"xml.codeLens.enabled": true,
"xml.format.spaceBeforeEmptyCloseTag": false,
"xml.format.preserveSpace": [
// Default
"xsl:text",
"xsl:comment",
"xsl:processing-instruction",
"literallayout",
"programlisting",
"screen",
"synopsis",
"pre",
"xd:pre",
// Custom
"string"
],
"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml"
},
"evenBetterToml.formatter.alignComments": false,
"evenBetterToml.formatter.alignEntries": false,
"evenBetterToml.formatter.allowedBlankLines": 1,
"evenBetterToml.formatter.arrayAutoCollapse": true,
"evenBetterToml.formatter.arrayAutoExpand": true,
"evenBetterToml.formatter.arrayTrailingComma": true,
"evenBetterToml.formatter.columnWidth": 80,
"evenBetterToml.formatter.compactArrays": true,
"evenBetterToml.formatter.compactEntries": false,
"evenBetterToml.formatter.compactInlineTables": false,
"evenBetterToml.formatter.indentEntries": false,
"evenBetterToml.formatter.indentTables": false,
"evenBetterToml.formatter.inlineTableExpand": false,
"evenBetterToml.formatter.reorderArrays": true,
"evenBetterToml.formatter.trailingNewline": true,
// We like keeping TOML keys in a certain non-alphabetical order that feels more natural
"evenBetterToml.formatter.reorderKeys": false
}
{
"editor.rulers": [
80,
120
],
"[git-commit]": {
"editor.rulers": [
72
]
},
"[markdown]": {
"files.trimTrailingWhitespace": false,
},
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"editor.comments.insertSpace": true,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"editor.tabSize": 2,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true,
// Let dedicated linter (Ruff) organize imports
"source.organizeImports": false,
},
"emeraldwalk.runonsave": {
"commands": [
{
"match": "\\.pyi?",
"cmd": "add-trailing-comma ${file}"
},
]
},
"files.associations": {
".flake8": "properties",
"*.qrc": "xml",
"*.ui": "xml"
},
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/.*_cache": true, // mypy and Ruff cache
"**/__pycache__": true,
// Only show useful PyInstaller logs
"build/*.*": true,
"build/[b-z]*": true,
"build/**/localpycs": true,
"build/**/Tree-*": true,
"build/**/*.{manifest,pkg,zip,tcl,res,pyz}": true,
},
"search.exclude": {
"**/*.code-search": true,
"*.lock": true,
},
// Set the default formatter to help avoid Prettier
"[json][jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features",
},
"[python]": {
// Ruff as a formatter doesn't fully satisfy our needs yet: https://github.com/astral-sh/ruff/discussions/7310
"editor.defaultFormatter": "ms-python.autopep8",
"editor.tabSize": 4,
"editor.rulers": [
72, // PEP8-17 docstrings
// 79, // PEP8-17 default max
// 88, // Black default
// 99, // PEP8-17 acceptable max
120, // Our hard rule
],
},
"mypy-type-checker.importStrategy": "fromEnvironment",
"mypy-type-checker.args": [
// https://github.com/microsoft/vscode-mypy/issues/37#issuecomment-1602702174
"--config-file=mypy.ini",
],
"python.terminal.activateEnvironment": true,
// python.analysis is Pylance (pyright) configurations
"python.analysis.fixAll": [
"source.convertImportFormat"
// Explicitly omiting "source.unusedImports", can be annoying when commenting code for debugging
],
// Important to follow the config in pyrightconfig.json
"python.analysis.useLibraryCodeForTypes": false,
"python.analysis.diagnosticMode": "workspace",
"ruff.importStrategy": "fromEnvironment",
// Use the Ruff extension instead
"isort.check": false,
// linting/formatting options deprecated, use dedicated extensions instead
// https://github.com/microsoft/vscode-python/wiki/Migration-to-Python-Tools-Extensions
"python.linting.enabled": false,
"python.linting.banditEnabled": false,
"python.linting.flake8Enabled": false,
"python.linting.prospectorEnabled": false,
"python.linting.pycodestyleEnabled": false,
"python.linting.pylamaEnabled": false,
"python.linting.pylintEnabled": false,
"python.linting.mypyEnabled": false,
"python.formatting.provider": "none",
"powershell.codeFormatting.pipelineIndentationStyle": "IncreaseIndentationForFirstPipeline",
"powershell.codeFormatting.autoCorrectAliases": true,
"powershell.codeFormatting.trimWhitespaceAroundPipe": true,
"powershell.codeFormatting.useConstantStrings": true,
"powershell.codeFormatting.useCorrectCasing": true,
"powershell.codeFormatting.whitespaceBetweenParameters": true,
"powershell.integratedConsole.showOnStartup": false,
"terminal.integrated.defaultProfile.windows": "PowerShell",
"xml.codeLens.enabled": true,
"xml.format.spaceBeforeEmptyCloseTag": false,
"xml.format.preserveSpace": [
// Default
"xsl:text",
"xsl:comment",
"xsl:processing-instruction",
"literallayout",
"programlisting",
"screen",
"synopsis",
"pre",
"xd:pre",
// Custom
"string"
],
"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml"
},
"evenBetterToml.formatter.alignComments": false,
"evenBetterToml.formatter.alignEntries": false,
"evenBetterToml.formatter.allowedBlankLines": 1,
"evenBetterToml.formatter.arrayAutoCollapse": true,
"evenBetterToml.formatter.arrayAutoExpand": true,
"evenBetterToml.formatter.arrayTrailingComma": true,
"evenBetterToml.formatter.columnWidth": 80,
"evenBetterToml.formatter.compactArrays": true,
"evenBetterToml.formatter.compactEntries": false,
"evenBetterToml.formatter.compactInlineTables": false,
"evenBetterToml.formatter.indentEntries": false,
"evenBetterToml.formatter.indentTables": false,
"evenBetterToml.formatter.inlineTableExpand": false,
"evenBetterToml.formatter.reorderArrays": true,
"evenBetterToml.formatter.trailingNewline": true,
// We like keeping TOML keys in a certain non-alphabetical order that feels more natural
"evenBetterToml.formatter.reorderKeys": false
}
Loading

0 comments on commit 1394bf0

Please sign in to comment.