Skip to content
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
26 changes: 5 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,10 @@ on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version:
- '3.10'
- '3.11'

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with Pylint
run: |
pip install pylint
pylint --disable=all --enable=F,E,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode fanfou_sdk
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
- run: uv python install
- run: uv sync --all-extras --dev
- run: uv run ruff check .
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
1 change: 0 additions & 1 deletion fanfou_sdk/__init__.py

This file was deleted.

15 changes: 15 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[project]
name = "fanfou_sdk"
version = "0.0.3"
description = "Fanfou SDK for Python"
readme = "README.md"
authors = [{ name = "LitoMore", email = "litomore@gmail.com" }]
requires-python = ">=3.13"
dependencies = ["requests>=2.32.5", "six>=1.17.0"]

[build-system]
requires = ["uv_build>=0.8.13,<0.9.0"]
build-backend = "uv_build"

[dependency-groups]
dev = ["ruff>=0.12.10"]
1 change: 1 addition & 0 deletions src/fanfou_sdk/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .fanfou import Fanfou as Fanfou
File renamed without changes.
2 changes: 1 addition & 1 deletion fanfou_sdk/oauth.py → src/fanfou_sdk/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def get_base_string(self, request, oauth_data):
return base_string

def get_signing_key(self, token_secret=''):
if (self.last_ampersand == False) & (token_secret == ''):
if (not self.last_ampersand) & (token_secret == ''):
return self.escape(self.consumer['secret'])
return self.escape(self.consumer['secret']) + '&' + self.escape(token_secret)

Expand Down
Empty file added src/fanfou_sdk/py.typed
Empty file.
134 changes: 134 additions & 0 deletions uv.lock

Large diffs are not rendered by default.