Skip to content

Commit

Permalink
Update setup for fix debian virtual environment Python 3.10 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Limych committed Feb 8, 2023
1 parent 3a2e0e6 commit 0ef4f65
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ jobs:
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
Expand All @@ -61,7 +61,7 @@ jobs:
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
Expand Down
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@ repos:
language: script
files: ^(custom_components/.+/const\.py|requirements\.txt)$
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.4
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py37-plus]
args: [ --py37-plus ]
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 23.1.0
hooks:
- id: black
args:
- --safe
- --quiet
files: ^(custom_components|bin|tests)/.+\.py$
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.1
- repo: https://github.com/pycqa/flake8.git
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-docstrings==1.5.0
- pydocstyle==5.0.2
files: ^(custom_components|bin|tests)/.+\.py$
- repo: https://github.com/PyCQA/bandit
rev: 1.7.0
rev: 1.7.4
hooks:
- id: bandit
args:
Expand All @@ -37,11 +37,11 @@ repos:
- --configfile=tests/bandit.yaml
files: ^(custom_components|bin|tests)/.+\.py$
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.6.4
rev: v5.10.1
hooks:
- id: isort
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
rev: v4.4.0
hooks:
- id: check-executables-have-shebangs
stages: [manual]
Expand Down
1 change: 0 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@
}
]
}

4 changes: 3 additions & 1 deletion bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ source ./bin/_common

if [ ! -d "venv" ]; then
log.info "Initializing the virtual environment..."
${python} -m venv venv
# For error 'executable `python` not found' run
# rm -Rf ~/.local/share/virtualenv
${python} -m venv ./venv
source ./venv/bin/activate
python="${ROOT}/venv/bin/python3"
fi
Expand Down
3 changes: 2 additions & 1 deletion bin/update_requirements
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ def get_package(requre: str) -> str:

harequire = ["homeassistant"]
request = requests.get(
"https://raw.githubusercontent.com/home-assistant/core/dev/requirements.txt"
"https://raw.githubusercontent.com/home-assistant/core/dev/requirements.txt",
timeout=10
)
request = request.text.split("\n")
for req in request:
Expand Down
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Integration blueprint",
"hacs": "1.6.0",
"homeassistant": "2022.6.0"
"homeassistant": "2022.10.0"
}
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ known_first_party = custom_components,tests
forced_separate = tests

[mypy]
python_version = 3.9
ignore_errors = true
follow_imports = silent
ignore_missing_imports = true
Expand Down

0 comments on commit 0ef4f65

Please sign in to comment.