Skip to content

Commit 8012a7e

Browse files
authored
Merge pull request #570 from sdispater/update-workflow
Update tests workflow and fix linting
2 parents f47aec9 + 67671ee commit 8012a7e

File tree

4 files changed

+23
-9
lines changed

4 files changed

+23
-9
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- name: Install and set up Poetry
4545
run: |
4646
curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py
47-
python get-poetry.py --preview -y
47+
python get-poetry.py -y
4848
- name: Build distributions
4949
run: |
5050
source $HOME/.poetry/env
@@ -75,7 +75,7 @@ jobs:
7575
- name: Install and setup Poetry
7676
run: |
7777
Invoke-WebRequest https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -O get-poetry.py
78-
python get-poetry.py --preview -y
78+
python get-poetry.py -y
7979
- name: Build distributions
8080
run: |
8181
$env:Path += ";$env:Userprofile\.poetry\bin"
@@ -105,7 +105,7 @@ jobs:
105105
- name: Install and set up Poetry
106106
run: |
107107
curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py
108-
python get-poetry.py --preview -y
108+
python get-poetry.py -y
109109
- name: Set up cache
110110
uses: actions/cache@v1
111111
with:

.github/workflows/tests.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
name: Tests
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'docs/**'
7+
branches:
8+
- master
9+
pull_request:
10+
paths-ignore:
11+
- 'docs/**'
12+
branches:
13+
- '**'
414

515
jobs:
616
Linting:
@@ -36,7 +46,7 @@ jobs:
3646
- name: Install and set up Poetry
3747
run: |
3848
curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py
39-
python get-poetry.py --preview -y
49+
python get-poetry.py -y
4050
source $HOME/.poetry/env
4151
poetry config virtualenvs.in-project true
4252
- name: Set up cache
@@ -82,7 +92,7 @@ jobs:
8292
- name: Install and set up Poetry
8393
run: |
8494
curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py
85-
python get-poetry.py --preview -y
95+
python get-poetry.py -y
8696
source $HOME/.poetry/env
8797
poetry config virtualenvs.in-project true
8898
- name: Set up cache
@@ -127,7 +137,7 @@ jobs:
127137
- name: Install and setup Poetry
128138
run: |
129139
Invoke-WebRequest https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -O get-poetry.py
130-
python get-poetry.py --preview -y
140+
python get-poetry.py -y
131141
$env:Path += ";$env:Userprofile\.poetry\bin"
132142
poetry config virtualenvs.in-project true
133143
- name: Set up cache

pendulum/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,10 @@ def yesterday(tz="local"): # type: (Union[str, _Timezone]) -> DateTime
251251

252252

253253
def from_format(
254-
string, fmt, tz=UTC, locale=None, # noqa
254+
string,
255+
fmt,
256+
tz=UTC,
257+
locale=None, # noqa
255258
): # type: (str, str, Union[str, _Timezone], Optional[str]) -> DateTime
256259
"""
257260
Creates a DateTime instance from a specific format.

tests/datetime/test_from_format.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ def test_from_format_with_timezone():
3939
def test_from_format_with_square_bracket_in_timezone():
4040
with pytest.raises(ValueError, match="^String does not match format"):
4141
pendulum.from_format(
42-
"1975-05-21 22:32:11 Eu[rope/London", "YYYY-MM-DD HH:mm:ss z",
42+
"1975-05-21 22:32:11 Eu[rope/London",
43+
"YYYY-MM-DD HH:mm:ss z",
4344
)
4445

4546

0 commit comments

Comments
 (0)