Skip to content

Commit

Permalink
Merge pull request #3 from essteer/workflow
Browse files Browse the repository at this point in the history
Refactor
  • Loading branch information
essteer authored Jun 7, 2024
2 parents 3813a90 + d1d5b66 commit 68c6b1d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ruff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ jobs:
- uses: chartboost/ruff-action@v1
with:
# Ruff version - sync with .pre-commit-config.yaml
version: 0.4.4
version: 0.4.5
args: check --fix --exit-non-zero-on-fix --show-fixes
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version - sync with .github/workflows/ruff.yaml
rev: v0.4.4
rev: v0.4.5
hooks:
# Run the linter.
- id: ruff
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1 style="text-align: center;">Masquer</h1>
<h1 align="center">Masquer</h1>

<p align="center">
<a href="https://github.com/essteer/masquer/actions/workflows/test.yaml"><img src="https://github.com/essteer/masquer/actions/workflows/test.yaml/badge.svg"></a>
Expand Down
5 changes: 1 addition & 4 deletions src/masquer/utils/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,14 @@ def get_response(ua: bool, rf: bool, hd: bool) -> dict:
response_data: dict
useragent | referer | header data as requested
"""
response_data = dict()
# header data
if hd:
response_data = HEADER_DATA
else:
response_data = dict()

# referer
if rf:
referer = select_data(REFERERS, REFERER_WEIGHTS)
response_data["Referer"] = referer

# user-agent
if ua:
useragent = select_data(USERAGENTS, USERAGENT_WEIGHTS)
Expand Down
2 changes: 1 addition & 1 deletion update.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def update_assets() -> bool:
root_dir = os.path.abspath(os.path.dirname(__file__))
# Path to assets and utils directories
assets_dir = os.path.join(root_dir, "assets")
utils_dir = os.path.join(root_dir, "src", "utils")
utils_dir = os.path.join(root_dir, "src", "masquer", "utils")

# Get JSON file data
header_data = extract_data(os.path.join(assets_dir, "header.json"))
Expand Down

0 comments on commit 68c6b1d

Please sign in to comment.