Skip to content
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

Increase minimum Python version to 3.10 #33

Merged
merged 2 commits into from
Nov 20, 2023
Merged
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/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.10'

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '^3.8'
python-version: '^3.10'

- name: Install solidation
run: python -m pip install .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/typing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.10'

- name: Install dependencies
run: |
Expand Down
4 changes: 1 addition & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ keywords =
classifiers =
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: Implementation :: CPython
Expand All @@ -35,7 +33,7 @@ packages = find_namespace:
package_dir =
=src
include_package_data = True
python_requires = >= 3.8
python_requires = >= 3.10
install_requires =
click >= 8.0
click-loglevel ~= 0.2
Expand Down
11 changes: 6 additions & 5 deletions src/solidation/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
import os
from pathlib import Path
from random import sample
from re import Pattern
from statistics import quantiles
from typing import TYPE_CHECKING, Any, List, Pattern, Set, Union
from typing import TYPE_CHECKING, Any
from urllib.parse import quote
import click
from click_loglevel import LogLevel
Expand Down Expand Up @@ -37,7 +38,7 @@ class RepoSpec(BaseModel):

class OrgSpec(BaseModel):
name: GHUser
fetch_members: Union[StrictBool, Pattern] = False
fetch_members: StrictBool | Pattern = False
member_activity_only: bool = False

def member_fetched(self, user: str) -> bool:
Expand All @@ -50,9 +51,9 @@ def member_fetched(self, user: str) -> bool:
class Configuration(BaseModel):
project: str = "Project"
recent_days: int = Field(default=7, ge=1)
organizations: List[Union[GHUser, OrgSpec]] = Field(default_factory=list)
repositories: List[Union[GHRepo, RepoSpec]] = Field(default_factory=list)
members: Set[GHUser] = Field(default_factory=set)
organizations: list[GHUser | OrgSpec] = Field(default_factory=list)
repositories: list[GHRepo | RepoSpec] = Field(default_factory=list)
members: set[GHUser] = Field(default_factory=set)
num_oldest_prs: int = Field(default=10, ge=1)
max_random_issues: int = Field(default=5, ge=1)

Expand Down