Skip to content

Commit

Permalink
Update to satisfy pre-commit
Browse files Browse the repository at this point in the history
Perform all changes necessary to satisfy the pre-commit configuration.
  • Loading branch information
mcdonnnj committed Mar 5, 2022
1 parent 1f0cae1 commit a019da1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# lcgit 🎰
# lcgit 🎰 #

[![GitHub Build Status](https://github.com/cisagov/lcgit/workflows/build/badge.svg)](https://github.com/cisagov/lcgit/actions)
[![Coverage Status](https://coveralls.io/repos/github/cisagov/lcgit/badge.svg?branch=develop)](https://coveralls.io/github/cisagov/lcgit?branch=develop)
Expand Down Expand Up @@ -68,14 +68,14 @@ for i in lcg(range(100_000_000_000_000)):
print(i)
```

## NOOICE! 🕺
## NOOICE! 🕺 ##

## Contributing
## Contributing ##

We welcome contributions! Please see [`CONTRIBUTING.md`](CONTRIBUTING.md) for
details.

## License
## License ##

This project is in the worldwide [public domain](LICENSE).

Expand Down
5 changes: 3 additions & 2 deletions src/lcgit/lcgit.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
see: https://en.wikipedia.org/wiki/Linear_congruential_generator
"""

from random import randint, shuffle
from math import sin
# Standard Python Libraries
from collections.abc import Sequence
from ipaddress import _BaseNetwork
from math import sin
from random import randint, shuffle


def _lcg_params(u, v):
Expand Down
11 changes: 8 additions & 3 deletions tests/test_lcgit.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#!/usr/bin/env pytest -vs
"""Tests for lcgit."""

import pytest
# Standard Python Libraries
from ipaddress import ip_network as net

# Third-Party Libraries
import pytest

# cisagov Libraries
from lcgit import lcg, lcgit

sequences = [
Expand All @@ -25,7 +30,7 @@
@pytest.mark.parametrize("sequence", sequences)
def test_counts_and_dups(sequence):
"""Verify LCG output integrity."""
answer = sorted([i for i in sequence])
answer = sorted(i for i in sequence)
my_lcg = lcg(sequence)
accumulated = []
count = 0
Expand All @@ -40,7 +45,7 @@ def test_counts_and_dups(sequence):
@pytest.mark.parametrize("sequence", sequences)
def test_state_save_and_restore(sequence):
"""Verify state save and restore."""
answer = sorted([i for i in sequence])
answer = sorted(i for i in sequence)
lcg1 = lcg(sequence, emit=True)
accumulated = []
break_at = len(lcg1) / 2
Expand Down

0 comments on commit a019da1

Please sign in to comment.