Skip to content

Commit 381697b

Browse files
authored
Version 0.5.0 release (#641)
1 parent 2fe2418 commit 381697b

File tree

29 files changed

+1285
-1288
lines changed

29 files changed

+1285
-1288
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,18 @@ on:
77
pull_request:
88
workflow_dispatch:
99

10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
1017
jobs:
1118
build:
1219
runs-on: ubuntu-latest
1320
strategy:
21+
fail-fast: false
1422
matrix:
1523
python-version: ['3.9', '3.10', '3.11', '3.12']
1624

.readthedocs.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
# .readthedocs.yml
22
version: 2
33

4-
# Set the version of Python and other tools you might need
54
build:
6-
os: ubuntu-20.04
7-
tools:
8-
python: "3.9"
5+
os: ubuntu-lts-latest
6+
tools: {python: "3.11"}
97
jobs:
108
pre_create_environment:
119
- asdf plugin add poetry
1210
- asdf install poetry latest
1311
- asdf global poetry latest
1412
- poetry config virtualenvs.create false
15-
post_install:
16-
- |
17-
. "$(pwd | rev | sed 's/stuokcehc/svne/' | rev)/bin/activate"
18-
&& poetry install --only main --only docs
13+
- poetry self add poetry-plugin-export
14+
- poetry export --only main --only docs --format=requirements.txt --output=requirements.txt
15+
16+
python:
17+
install:
18+
- requirements: requirements.txt
1919

20-
# Build documentation in the docs/ directory with Sphinx
2120
sphinx:
2221
configuration: docs/conf.py
2322
fail_on_warning: true

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@
33
We follow Semantic Versions.
44

55

6+
## Version 0.5.0
7+
8+
### Features
9+
10+
- Drops `python3.7` and `python3.8` support
11+
- Adds `python3.11` and `python3.12` support
12+
- Removes `importlib_metadata` package
13+
14+
### Misc
15+
16+
- Updates multiple dependencies
17+
18+
619
## Version 0.4.0
720

821
### Features

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ FROM python:3.10.7-alpine
2020
LABEL maintainer="sobolevn@wemake.services"
2121
LABEL vendor="wemake.services"
2222

23-
ENV DOTENV_LINTER_VERSION='0.4.0'
23+
ENV DOTENV_LINTER_VERSION='0.5.0'
2424
ENV REVIEWDOG_VERSION='v0.14.2'
2525

2626
RUN apk add --no-cache bash git wget

docs/conf.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,16 @@
1515
import os
1616
import sys
1717

18+
import tomli
19+
1820
sys.path.insert(0, os.path.abspath('..'))
1921

2022

2123
# -- Project information -----------------------------------------------------
2224

2325
def _get_project_meta():
24-
import tomlkit # noqa: WPS433
25-
26-
with open('../pyproject.toml') as pyproject:
27-
file_contents = pyproject.read()
28-
29-
return tomlkit.parse(file_contents)['tool']['poetry']
26+
with open('../pyproject.toml', mode='rb') as pyproject:
27+
return tomli.load(pyproject)['tool']['poetry']
3028

3129

3230
pkg_meta = _get_project_meta()
@@ -42,7 +40,7 @@ def _get_project_meta():
4240

4341
# -- General configuration ---------------------------------------------------
4442

45-
needs_sphinx = '3.3'
43+
needs_sphinx = '5.3'
4644

4745
# Add any Sphinx extension module names here, as strings. They can be
4846
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom

dotenv_linter/checker.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
from __future__ import annotations
2+
13
import sys
24
from enum import IntEnum
3-
from typing import Iterable, Iterator, NoReturn, Optional, Tuple
4-
5-
from typing_extensions import final
5+
from typing import Any, Iterable, Iterator, NoReturn, Optional, Tuple, final
66

77
from dotenv_linter.exceptions import ParsingError
88
from dotenv_linter.grammar.fst import Module
@@ -96,7 +96,11 @@ class DotenvFileChecker(object):
9696
"""
9797

9898
# TODO: create options
99-
def __init__(self, filenames: Iterable[str], options=None) -> None:
99+
def __init__(
100+
self,
101+
filenames: Iterable[str],
102+
options: Any | None = None,
103+
) -> None:
100104
"""Creates new instance."""
101105
self._fst_checker = _FSTChecker(filenames)
102106

dotenv_linter/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
invoke_without_command=True,
2020
)
2121
@click.option('--version', is_flag=True, default=False)
22-
def cli(version):
22+
def cli(version: bool) -> None:
2323
"""
2424
Main entrypoint to the app.
2525
@@ -30,14 +30,14 @@ def cli(version):
3030
print(pkg_version) # noqa: WPS421
3131

3232

33-
@cli.command()
33+
@cli.command() # type: ignore[misc]
3434
@click.argument(
3535
'files',
3636
nargs=-1,
3737
required=True,
3838
type=click.Path(exists=True, dir_okay=False),
3939
)
40-
def lint(files: Tuple[str, ...]):
40+
def lint(files: Tuple[str, ...]) -> None:
4141
"""Runs linting process for the given files."""
4242
checker = DotenvFileChecker(files)
4343

dotenv_linter/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""This module contains list of black-listed ``environment`` variables."""
22

33

4-
from typing_extensions import Final
4+
from typing import Final
55

66
#: List of variable we forbid to use.
77
NAMES_BLACKLIST: Final = frozenset((

dotenv_linter/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing_extensions import final
1+
from typing import final
22

33

44
@final

dotenv_linter/grammar/fst.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@
1717
1818
"""
1919

20-
from typing import Optional, Sequence, Type, TypeVar, Union
20+
from typing import Optional, Sequence, Type, TypeVar, Union, final
2121

2222
from attr import dataclass, field
2323
from ply import lex
24-
from typing_extensions import final
2524

2625
from dotenv_linter.logics.text import normalize_text
2726

@@ -119,4 +118,4 @@ def from_token(
119118
class Module(Node):
120119
"""Wrapper node that represents a single file with or without contents."""
121120

122-
body: Sequence[Union[Comment, Statement]]
121+
body: Sequence[Union[Comment, Statement, Name]]

0 commit comments

Comments
 (0)