Skip to content

Commit

Permalink
spelling fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
purarue committed Sep 23, 2023
1 parent 0ad354d commit eb0b64c
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Converting a single-file module to a namespace module [is always a breaking chan

A user (or me) may want to write their own module with the same name, meaning they can't use both at the same time if mine is just `my.module_name.py`, since my module existing means any other namespace packages can't have the same base name (see [reorder_editable](https://github.com/seanbreckenridge/reorder_editable) for an explanation)

The one motivating this change is `apple.py`, since the old `apple.py` was parsing the privacy export, but I wanted to add something to parse [`imessage`](https://github.com/seanbreckenridge/HPI/commit/e361ce8182d8be8b331875078ad17605d3f80a50) files. Someone else may want to add other `apple/file.py` files to parse other parts of apple/mac behaviour, but me having the single `apple.py` either means they have to have their repo before mine on their path (but doing so means they overwrite the current `apple.py` file, so they cant use that to parse their privacy export, even if they were trying to do something else entirely), or they have to rename their code to something like `my_apple/file.py` to create a new namespace module
The one motivating this change is `apple.py`, since the old `apple.py` was parsing the privacy export, but I wanted to add something to parse [`imessage`](https://github.com/seanbreckenridge/HPI/commit/e361ce8182d8be8b331875078ad17605d3f80a50) files. Someone else may want to add other `apple/file.py` files to parse other parts of apple/mac behaviour, but me having the single `apple.py` either means they have to have their repo before mine on their path (but doing so means they overwrite the current `apple.py` file, so they can't use that to parse their privacy export, even if they were trying to do something else entirely), or they have to rename their code to something like `my_apple/file.py` to create a new namespace module

Possible 'Exceptions' to this:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This is built on top of [`karlicoss/HPI`](https://github.com/karlicoss/HPI). It

- `my.zsh` and `my.bash`, access to my shell history w/ timestamps
- `my.mail.imap` and `my.mail.mbox` to parse local IMAP sync's of my mail/mbox files -- see [doc/MAIL_SETUP.md](doc/MAIL_SETUP.md)
- `my.mpv.history_daemon`, accesses movies/music w/ activity/metdata that have played on my machine, facilitated by a [mpv history daemon](https://github.com/seanbreckenridge/mpv-history-daemon)
- `my.mpv.history_daemon`, accesses movies/music w/ activity/metadata that have played on my machine, facilitated by a [mpv history daemon](https://github.com/seanbreckenridge/mpv-history-daemon)
- `my.discord.data_export`, parses ~1,000,000 messages/events from the discord data export, parser [here](https://github.com/seanbreckenridge/discord_data)
- `my.todotxt.git_history`, to track my to-do list history (using backups of my [`todotxt`](http://todotxt.org/) files in [`git_doc_history`](https://github.com/seanbreckenridge/git_doc_history))
- `my.rss.newsboat`, keeps track of when I added/removed RSS feeds (for [`newsboat`](https://newsboat.org/))
Expand Down
2 changes: 1 addition & 1 deletion doc/TROUBLESHOOTING_INSTALLS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ If you're having issues -- try doing the following

I'll use my promnesia modules (at <https://github.com/seanbreckenridge/promnesia>) as an example.

Note: though the repository is `promnesia`, the module it installs is `promnesia_sean`. In python packages in general, its not necessary for the module name to match the repository (thats just where its hosted). To figure out what the name of the package is, use `python3 -m pip list`. For this HPI repository, it installs as `HPI-seanbreckenridge`, so its possible to differentiate between this and upstream HPI.
Note: though the repository is `promnesia`, the module it installs is `promnesia_sean`. In python packages in general, its not necessary for the module name to match the repository (that's just where its hosted). To figure out what the name of the package is, use `python3 -m pip list`. For this HPI repository, it installs as `HPI-seanbreckenridge`, so its possible to differentiate between this and upstream HPI.

These are directions for installing a package as non-editable (into your python `site-packages`), though it covers uninstalling editable packages -- in case your path is misconfigured in some way. If you want to install as editable, see [reorder_editable](https://github.com/seanbreckenridge/reorder_editable) and the [install section](https://github.com/seanbreckenridge/HPI#install) of the README for issues you may run into, or see the [editable](#editable) section of this doc

Expand Down
2 changes: 1 addition & 1 deletion my/facebook/gdpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def _parse_messages_in_conversation(
# yikes. this is pretty much whenever I posted *anything*, or a third party app communicated
# back to facebook that I listened to something/played a game, so it has like 5000 events
#
# not sure if I hit all the types, but this yields RuntimeErrors if it cant parse something,
# not sure if I hit all the types, but this yields RuntimeErrors if it can't parse something,
# so just check hpi doctor to make sure its all gooood
# or
# list(filter(lambda e: isinstance(e, Exception), events())),
Expand Down
2 changes: 1 addition & 1 deletion my/mail/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def describe_person(p: Tuple[str, str]) -> str:
)
converts to
Person <[email protected]>
if theres no 'Person' text, it
if there's no 'Person' text, it
just becomes:
[email protected]
"""
Expand Down
2 changes: 1 addition & 1 deletion my/piazza/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def posts() -> Iterator[Post]:
"""
for exp in classes():
# hmm -- it seems that I'm always the only user in this?
# will check an envvar incase someone else has issues configuring this/has different results
# will check an envvar in case someone else has issues configuring this/has different results
# feel free to open an issue
user_id: Optional[str] = os.environ.get("PIAZZA_UID")
if user_id is None:
Expand Down
2 changes: 1 addition & 1 deletion my/project_euler.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def _parse_file(p: Path) -> Iterator[Solution]:
if m:
problem, day, month_desc, year_short, hour, minute = m.groups()
month_lowered = month_desc.lower()
assert month_lowered in MONTHS, f"Couldnt find {month_lowered} in {MONTHS}"
assert month_lowered in MONTHS, f"Couldn't find {month_lowered} in {MONTHS}"
# datetimes in the file are UTC time
yield Solution(
problem=int(problem),
Expand Down
2 changes: 1 addition & 1 deletion my/spotify/gdpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def _filter_playlists(d: Json) -> Iterator[Playlist]:
# parse, then filter
# make sure this playlist has more than one artist
# if its just one artist, its probably just an album
# thats been classified as a playlist
# that's been classified as a playlist
for p in _parse_all_playlists(d):
if len(set([s.artist for s in p.songs])) > 1:
yield p
Expand Down
4 changes: 2 additions & 2 deletions my/zsh.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ def _parse_file(histfile: Path) -> Results:
dt: Optional[datetime] = None
dur: Optional[int] = None
command: str = ""
# cant parse line by line since some commands are multiline
# can't parse line by line since some commands are multiline
# sort of structured like a do-while loop
for line in histfile.open(encoding="latin-1"):
r = _parse_metadata(line)
# if regex didnt match, this is a multi line command string
# if regex didn't match, this is a multi line command string
if r is None:
command += "\n" + line
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_commits.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_commits() -> None:
biggest_repo = r
break
else:
raise RuntimeError("Couldnt find a repo with more than 100 files!")
raise RuntimeError("Couldn't find a repo with more than 100 files!")
commits_for_repo = list(_cached_commits(biggest_repo))
assert len(commits_for_repo) >= 1
assert isinstance(commits_for_repo[0], Commit)

0 comments on commit eb0b64c

Please sign in to comment.