Compare commits
5 Commits
a974601323
...
e991074346
Author | SHA1 | Date | |
---|---|---|---|
|
e991074346 | ||
|
66b42e0b96 | ||
|
c6d8575ae5 | ||
|
8ca480ad77 | ||
|
0a55c64551 |
@ -23,7 +23,7 @@ jobs:
|
||||
- run: pip install mypy
|
||||
- run: mypy org_rw --check-untyped-defs
|
||||
|
||||
formatting:
|
||||
style-formatting:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
@ -33,6 +33,16 @@ jobs:
|
||||
- run: pip install black
|
||||
- run: black --check .
|
||||
|
||||
style-sorted-imports:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- run: apt-get update && apt-get install -y python3-pip
|
||||
- run: pip install -e .
|
||||
- run: pip install isort
|
||||
- run: isort --profile black --check .
|
||||
|
||||
stability-extra-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
@ -1,6 +1,5 @@
|
||||
from __future__ import annotations
|
||||
from typing import Dict, Optional, TextIO
|
||||
from datetime import timedelta
|
||||
|
||||
import collections
|
||||
import difflib
|
||||
import logging
|
||||
@ -9,12 +8,21 @@ import re
|
||||
import sys
|
||||
from datetime import date, datetime, timedelta
|
||||
from enum import Enum
|
||||
from typing import cast, Iterator, List, Literal, Optional, Tuple, TypedDict, Union
|
||||
|
||||
from .types import HeadlineDict
|
||||
from typing import (
|
||||
Dict,
|
||||
Iterator,
|
||||
List,
|
||||
Literal,
|
||||
Optional,
|
||||
TextIO,
|
||||
Tuple,
|
||||
TypedDict,
|
||||
Union,
|
||||
cast,
|
||||
)
|
||||
|
||||
from . import dom
|
||||
|
||||
from .types import HeadlineDict
|
||||
|
||||
DEBUG_DIFF_CONTEXT = 10
|
||||
|
||||
|
@ -6,16 +6,15 @@ from .org_rw import (
|
||||
Headline,
|
||||
Italic,
|
||||
Line,
|
||||
RawLine,
|
||||
ListItem,
|
||||
RawLine,
|
||||
Strike,
|
||||
Text,
|
||||
Underlined,
|
||||
Verbatim,
|
||||
dump_contents,
|
||||
)
|
||||
|
||||
from .org_rw import dump_contents
|
||||
|
||||
|
||||
def get_hl_raw_contents(doc: Headline) -> str:
|
||||
lines = []
|
||||
|
11
scripts/apply-formatting.sh
Executable file
11
scripts/apply-formatting.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
cd "`dirname $0`"
|
||||
cd ..
|
||||
|
||||
set -x
|
||||
|
||||
isort --profile black .
|
||||
black .
|
@ -2,9 +2,6 @@ import os
|
||||
import unittest
|
||||
from datetime import datetime as DT
|
||||
|
||||
from org_rw import MarkerToken, MarkerType, Timestamp, dumps, load, loads, dom
|
||||
import org_rw
|
||||
|
||||
from utils.assertions import (
|
||||
BOLD,
|
||||
CODE,
|
||||
@ -19,6 +16,9 @@ from utils.assertions import (
|
||||
Tokens,
|
||||
)
|
||||
|
||||
import org_rw
|
||||
from org_rw import MarkerToken, MarkerType, Timestamp, dom, dumps, load, loads
|
||||
|
||||
DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
"""Test the Timestamp object."""
|
||||
|
||||
import pytest
|
||||
from datetime import date, datetime
|
||||
|
||||
import pytest
|
||||
|
||||
from org_rw import Timestamp
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user