Skip to content

Commit

Permalink
Expand support to Python 3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhammerl committed Nov 12, 2021
1 parent 5a4a639 commit 6aa3671
Show file tree
Hide file tree
Showing 6 changed files with 265 additions and 178 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ jobs:
strategy:
matrix:
python:
- '3.6'
- '3.7'
- '3.8'
- '3.9'
- '3.10'
Expand Down
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
default_language_version:
python: python3
repos:
- repo: local
hooks:
Expand Down
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ pytest = "*"
black = "*"
twine = "*"
pre-commit = "*"
typing-extensions = "*"

[packages]

Expand Down
430 changes: 255 additions & 175 deletions Pipfile.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

This is an opinionated, simplified fork of [dbrgn/result](https://github.com/dbrgn/result).

Result is a simple, type annotated Result type for Python 3.8+ inspired by [Rust](https://doc.rust-lang.org/std/result/).
Result is a simple, type annotated Result type for Python 3.6+ inspired by [Rust](https://doc.rust-lang.org/std/result/).

The idea is that a result value can be either `Ok(value)` or `Err(error)`, with a way to differentiate between the two. `Ok` and `Err` are both classes wrapping an arbitrary value. `Result[T, E]` is a generic type alias for `typing.Union[Ok[T], Err[E]]`.

Requires Python 3.8 or higher!
Requires Python 3.6 or higher!


### Caveats
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
keywords="rust result",
packages=["resultify"],
python_requires=">=3.8",
python_requires=">=3.6",
)

0 comments on commit 6aa3671

Please sign in to comment.