Skip to content

Commit

Permalink
Merge pull request #65 from janeklb/jlb/python-12
Browse files Browse the repository at this point in the history
update all dependencies, target python 12, drop support for previous versions of python
  • Loading branch information
janeklb authored Aug 3, 2024
2 parents dc86824 + 11c19cc commit a77468a
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 25 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ name: Lint and Test

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
build:
name: Lint and Test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
python-version: ["3.12"]

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ venv
.coverage
/htmlcov
/build

.envrc
.direnv

2 changes: 1 addition & 1 deletion ghsearch/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
RESULTS_PER_PAGE = 100 # this is the max - see https://docs.github.com/en/rest/reference/search#search-code--parameters


def build_client(token: str, base_url: str = None) -> Github:
def build_client(token: str, base_url: str | None = None) -> Github:
client_params: Dict[str, Any] = {"per_page": RESULTS_PER_PAGE, "login_or_token": token}
if base_url:
client_params["base_url"] = base_url
Expand Down
13 changes: 8 additions & 5 deletions ghsearch/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@


def _build_filters(
path_filter: str = None, include_archived: bool = True, content_filter: str = None, regex_content_filter: str = None
path_filter: str | None = None,
include_archived: bool = True,
content_filter: str | None = None,
regex_content_filter: str | None = None,
) -> List[Filter]:
filters: List[Filter] = []
if path_filter:
Expand All @@ -29,10 +32,10 @@ def run(
query: List[str],
github_token: str,
printer: Printer,
github_api_url: str = None,
path_filter: str = None,
content_filter: str = None,
regex_content_filter: str = None,
github_api_url: str | None = None,
path_filter: str | None = None,
content_filter: str | None = None,
regex_content_filter: str | None = None,
include_archived: bool = False,
verbose: bool = False,
) -> None:
Expand Down
29 changes: 13 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ def get_readme():


install_requires = [
"click~=8.0.3",
"click~=8.1.7",
"click-config-file~=0.6.0",
"PyGithub~=1.54.1",
"ruamel.yaml~=0.17.16",
"PyGithub~=2.3.0",
"ruamel.yaml~=0.18.6",
]

dev_requires = [
"black~=22.1.0",
"coverage~=6.3.1",
"flake8~=3.7.7",
"isort~=5.10.1",
"mypy~=0.931",
"pip-tools~=5.3.1",
"pytest-mock~=3.7.0",
"pytest~=6.2.5",
"black~=24.8.0",
"coverage~=7.6.0",
"flake8~=7.1.0",
"isort~=5.13.2",
"mypy~=1.11.1",
"pip-tools~=7.4.1",
"pytest-mock~=3.14.0",
"pytest~=8.3.2",
]


Expand All @@ -44,15 +44,12 @@ def get_readme():
long_description_content_type="text/markdown",
packages=find_packages(exclude="tests"),
classifiers=[
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.12",
],
install_requires=install_requires,
setup_requires=["pytest-runner"],
tests_require=dev_requires,
python_requires=">=3.7",
python_requires=">=3.12",
extras_require={
"dev": dev_requires,
},
Expand Down

0 comments on commit a77468a

Please sign in to comment.