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)
(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
[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.
and [pyls-isort](https://github.com/paradoxxxzero/pyls-isort) plugins.
Additionally, `pylsp` is expected to be configured to use:
* [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

View File

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

View File

@ -1,15 +1,15 @@
import aiohttp
import asyncio
import json
import os
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
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
# 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_extensions import TypedDict
from app.repo import AnsiColor, Repo
class Export(TypedDict, total=False):
# The coach's rapid rating relative to the site they were sourced from.

View File

@ -1,14 +1,14 @@
import aiohttp
import asyncio
import os
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
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
# determined by going to https://lichess.org/coach/all/all/alphabetical

View File

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

View File

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

View File

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