Skip to content

Commit

Permalink
Prevent duplicate builds; update linting deps (#909)
Browse files Browse the repository at this point in the history
* Prevent duplicate builds; update linting deps

* Only run lint-pre-release upon releasing

* Fix black version
  • Loading branch information
sloria committed Jan 10, 2024
1 parent 18c4015 commit 9afc3cc
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: build
on:
push:
branches: ["dev", "*.x-line"]
tags: ["*"]
pull_request:

jobs:
tests:
name: ${{ matrix.name }}
Expand All @@ -27,6 +30,7 @@ jobs:
lint-pre-release:
name: lint
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/setup-python@v4.3.0
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [black==22.12.0]
additional_dependencies: [black==23.12.1]
args: ["--target-version", "py38"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ Usages are varied, but include
import marshmallow as ma
from webargs.flaskparser import FlaskParser
# as well as...
class MyParser(FlaskParser):
DEFAULT_UNKNOWN_BY_LOCATION = {"query": ma.INCLUDE}
Expand Down
2 changes: 2 additions & 0 deletions docs/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ precedence over these defaults, as in
parser = Parser(unknown=INCLUDE)
# because `unknown` is set on the parser, `DEFAULT_UNKNOWN_BY_LOCATION` has
# effect and `INCLUDE` will always be used
@app.route("/", methods=["POST"])
Expand Down Expand Up @@ -233,6 +234,7 @@ If you wish to use the value of `unknown` specified by a schema, simply pass
app = Flask(__name__)
# because unknown=None was passed, no value is passed during schema loading
# as a result, the schema's behavior (EXCLUDE) is used
@app.route("/", methods=["POST"])
Expand Down
1 change: 0 additions & 1 deletion docs/framework_support.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ The :class:`webargs.tornadoparser.TornadoParser` parses arguments from a :class:
class HelloHandler(tornado.web.RequestHandler):
hello_args = {"name": fields.Str()}
def post(self, id):
Expand Down
2 changes: 2 additions & 0 deletions docs/upgrading.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ To get identical behavior:
# assuming you have a schema named MySchema
# webargs 6.x
@parser.use_args(MySchema)
def foo(args):
Expand Down Expand Up @@ -571,6 +572,7 @@ so:
from webargs.pyramidparser import use_args
# webargs 5.x
# pass_userinfo is called first, webargs sees positional arguments of
# (userinfo,)
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ commands = pre-commit run --all-files
# `webargs` and `marshmallow` both installed is a valuable safeguard against
# issues in which `mypy` running on every file standalone won't catch things
[testenv:mypy]
deps = mypy==1.3.0
deps = mypy==1.8.0
extras = frameworks
commands = mypy src/ {posargs}

Expand Down

0 comments on commit 9afc3cc

Please sign in to comment.