Skip to content

Commit 9a4d5b3

Browse files
authored
Upgrade isort and set default dev interpreter to Python 3.8 (#602)
Update a few things related to the dev environment: * Set the default development interpreter version to Python 3.8. This should help improve startup times a bit to help iteration during development. * Lock dev dependencies again for Python 3.8. This resulted in updating isort to version 5.0, which produced a pretty significant diff (and made me break this PR out from #601). * In so doing, I also took this opportunity to update a few places where I'd used `as keyword`, `as symbol`, and `as vector` import aliases rather than `as kw`, `as sym`, and `as vec` respectively. Should make it easier to contribute new code anywhere and not be surprised about the alias in use.
1 parent 5801fef commit 9a4d5b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+424
-466
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ docs:
1919

2020
.PHONY: format
2121
format:
22-
@pipenv run sh -c 'isort -rc . && black .'
22+
@pipenv run sh -c 'isort --profile black . && black .'
2323

2424

2525
lispcore.py:

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ python-dateutil = "*"
2828
pytest = "*"
2929

3030
[requires]
31-
python_version = "3.6"
31+
python_version = "3.8"
3232

3333
[pipenv]
3434
allow_prereleases = true

Pipfile.lock

Lines changed: 62 additions & 93 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ exclude = '''
2424

2525
[tool.isort]
2626
known_first_party = 'basilisp'
27-
multi_line_output = 3
28-
include_trailing_comma = true
29-
force_grid_wrap = 0
30-
use_parentheses = true
31-
line_length = 88
32-
combine_as_imports = true
3327
skip = [
3428
'.env',
3529
'.hg',

src/basilisp/_pyast.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import sys
2-
from ast import ( # noqa
2+
from ast import Ellipsis # pylint: disable=redefined-builtin
3+
from ast import slice # pylint: disable=redefined-builtin
4+
from ast import (
35
AST,
46
Add,
57
And,
@@ -31,7 +33,6 @@
3133
Dict,
3234
DictComp,
3335
Div,
34-
Ellipsis,
3536
Eq,
3637
ExceptHandler,
3738
Expr,
@@ -64,7 +65,9 @@
6465
LtE,
6566
MatMult,
6667
Mod,
67-
Module as _Module,
68+
)
69+
from ast import Module as _Module # noqa
70+
from ast import (
6871
Mult,
6972
Name,
7073
NameConstant,
@@ -102,7 +105,9 @@
102105
YieldFrom,
103106
alias,
104107
arg,
105-
arguments as _arguments,
108+
)
109+
from ast import arguments as _arguments
110+
from ast import (
106111
boolop,
107112
cmpop,
108113
comprehension,
@@ -121,7 +126,6 @@
121126
mod,
122127
operator,
123128
parse,
124-
slice,
125129
stmt,
126130
unaryop,
127131
walk,

src/basilisp/cli.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
import click
77
import pytest
88

9-
import basilisp.lang.compiler as compiler
10-
import basilisp.lang.reader as reader
11-
import basilisp.lang.runtime as runtime
12-
import basilisp.lang.symbol as sym
13-
import basilisp.main as basilisp
9+
from basilisp import main as basilisp
10+
from basilisp.lang import compiler as compiler
11+
from basilisp.lang import reader as reader
12+
from basilisp.lang import runtime as runtime
13+
from basilisp.lang import symbol as sym
1414
from basilisp.prompt import get_prompter
1515

1616
CLI_INPUT_FILE_PATH = "<CLI Input>"

0 commit comments

Comments
 (0)