Skip to content

refactor: fix the flake8 error F824 #464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
max-parallel: 1
matrix:
python_version: ['2.7', '3.4', '3.5', '3.6', '3.7', '3.8', '3.9']
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v2
Expand Down
2 changes: 0 additions & 2 deletions qiniu/http/regions_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ def __init__(self, fd):

def __enter__(self):
with _file_threading_lockers_lock:
global _file_threading_lockers
threading_lock = _file_threading_lockers.get(self._file_path, threading.Lock())
# Could use keyword style `acquire(blocking=False)` when min version of python update to >= 3
if not threading_lock.acquire(False):
Expand All @@ -170,7 +169,6 @@ def __enter__(self):

def __exit__(self, exc_type, exc_val, exc_tb):
with _file_threading_lockers_lock:
global _file_threading_lockers
threading_lock = _file_threading_lockers.get(self._file_path)
if threading_lock and threading_lock.locked():
threading_lock.release()
Expand Down
Loading