Apply pyls-isort.

pull/9/head
Joshua Potter 2023-12-01 16:36:53 -07:00
parent a4b1647e53
commit 9b9e561e49
8 changed files with 33 additions and 29 deletions

View File

@ -103,10 +103,14 @@ $ nix develop
The [python-lsp-server](https://github.com/python-lsp/python-lsp-server) The [python-lsp-server](https://github.com/python-lsp/python-lsp-server)
(version v1.9.0) is included in this flake, along with the [python-lsp-black](https://github.com/python-lsp/python-lsp-black) (version v1.9.0) is included in this flake, along with the [python-lsp-black](https://github.com/python-lsp/python-lsp-black)
plugin for formatting purposes. `pylsp` is expected to be configured to use and [pyls-isort](https://github.com/paradoxxxzero/pyls-isort) plugins.
[McCabe](https://github.com/PyCQA/mccabe), [pycodestyle](https://pycodestyle.pycqa.org/en/latest/), Additionally, `pylsp` is expected to be configured to use:
and [pyflakes](https://github.com/PyCQA/pyflakes). Refer to your editor for
configuration details. * [McCabe](https://github.com/PyCQA/mccabe),
* [pycodestyle](https://pycodestyle.pycqa.org/en/latest/), and
* [pyflakes](https://github.com/PyCQA/pyflakes).
Refer to your editor for configuration details.
### Formatting ### Formatting

View File

@ -1,16 +1,13 @@
import aiohttp
import argparse import argparse
import asyncio import asyncio
import json import json
from app.chesscom import ( import aiohttp
Exporter as ChesscomExporter,
Scraper as ChesscomScraper, from app.chesscom import Exporter as ChesscomExporter
) from app.chesscom import Scraper as ChesscomScraper
from app.lichess import ( from app.lichess import Exporter as LichessExporter
Exporter as LichessExporter, from app.lichess import Scraper as LichessScraper
Scraper as LichessScraper,
)
from app.repo import Site from app.repo import Site

View File

@ -1,15 +1,15 @@
import aiohttp
import asyncio import asyncio
import json import json
import os import os
import os.path import os.path
from app.repo import AnsiColor, Site
from app.exporter import BaseExporter
from app.scraper import BaseScraper
from bs4 import BeautifulSoup
from typing import List, Union from typing import List, Union
import aiohttp
from bs4 import BeautifulSoup
from app.exporter import BaseExporter
from app.repo import AnsiColor, Site
from app.scraper import BaseScraper
# The number of coach listing pages we will at most iterate through. This number # The number of coach listing pages we will at most iterate through. This number
# was determined by going to chess.com/coaches?sortBy=alphabetical&page=1 and # was determined by going to chess.com/coaches?sortBy=alphabetical&page=1 and

View File

@ -1,7 +1,9 @@
from app.repo import AnsiColor, Repo
from typing import Union from typing import Union
from typing_extensions import TypedDict from typing_extensions import TypedDict
from app.repo import AnsiColor, Repo
class Export(TypedDict, total=False): class Export(TypedDict, total=False):
# The coach's rapid rating relative to the site they were sourced from. # The coach's rapid rating relative to the site they were sourced from.

View File

@ -1,14 +1,14 @@
import aiohttp
import asyncio import asyncio
import os import os
import os.path import os.path
from app.repo import AnsiColor, Site
from app.scraper import BaseScraper
from app.exporter import BaseExporter
from bs4 import BeautifulSoup, SoupStrainer
from typing import List from typing import List
import aiohttp
from bs4 import BeautifulSoup, SoupStrainer
from app.exporter import BaseExporter
from app.repo import AnsiColor, Site
from app.scraper import BaseScraper
# The number of pages we will at most iterate through. This number was # The number of pages we will at most iterate through. This number was
# determined by going to https://lichess.org/coach/all/all/alphabetical # determined by going to https://lichess.org/coach/all/all/alphabetical

View File

@ -1,6 +1,5 @@
import enum import enum
import os import os
from typing import List, Tuple, Union from typing import List, Tuple, Union

View File

@ -1,8 +1,9 @@
import aiohttp
import os import os
from typing import List, Tuple, Union
import aiohttp
from app.repo import Repo from app.repo import Repo
from typing import List, Tuple, Union
class BaseScraper(Repo): class BaseScraper(Repo):

View File

@ -85,6 +85,7 @@
mypy mypy
pycodestyle pycodestyle
pyflakes pyflakes
pyls-isort
python-lsp-black python-lsp-black
python-lsp-server python-lsp-server
]); ]);