Compare commits

..

2 Commits

Author SHA1 Message Date
Teal Dulcet
271da89153 Added Ruff config.
Some checks failed
CI / Linux C++ (clang++, ubuntu-22.04) (push) Has been cancelled
CI / Linux C++ (clang++, ubuntu-24.04) (push) Has been cancelled
CI / Linux C++ (g++, ubuntu-22.04) (push) Has been cancelled
CI / Linux C++ (g++, ubuntu-24.04) (push) Has been cancelled
CI / Pylint (push) Has been cancelled
CI / Ruff (push) Has been cancelled
CI / Linux Python (ubuntu-22.04, 3.7) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, 3.10) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, 3.11) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, 3.12) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, 3.13) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, 3.8) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, 3.9) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, pypy3.10) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, pypy3.6) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, pypy3.7) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, pypy3.8) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, pypy3.9) (push) Has been cancelled
2025-07-01 06:20:56 -07:00
Teal Dulcet
e94e99b837 Updated CI to remove Ubuntu 20.04.
Some checks failed
CI / Linux C++ (clang++, ubuntu-22.04) (push) Has been cancelled
CI / Linux C++ (clang++, ubuntu-24.04) (push) Has been cancelled
CI / Linux C++ (g++, ubuntu-22.04) (push) Has been cancelled
CI / Linux C++ (g++, ubuntu-24.04) (push) Has been cancelled
CI / Pylint (push) Has been cancelled
CI / Ruff (push) Has been cancelled
CI / Linux Python (ubuntu-22.04, 3.7) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, 3.10) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, 3.11) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, 3.12) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, 3.13) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, 3.8) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, 3.9) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, pypy3.10) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, pypy3.6) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, pypy3.7) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, pypy3.8) (push) Has been cancelled
CI / Linux Python (ubuntu-latest, pypy3.9) (push) Has been cancelled
2025-05-01 03:35:06 -07:00
9 changed files with 97 additions and 173 deletions

View File

@@ -11,10 +11,9 @@ jobs:
name: Linux C++ name: Linux C++
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.cxx == 'clang++' && matrix.os == 'ubuntu-20.04' }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04] os: [ubuntu-22.04, ubuntu-24.04]
cxx: [g++, clang++] cxx: [g++, clang++]
fail-fast: false fail-fast: false
env: env:
@@ -69,7 +68,7 @@ jobs:
python3 -m pip install --upgrade pip python3 -m pip install --upgrade pip
python3 -m pip install ruff python3 -m pip install ruff
- name: Script - name: Script
run: ruff check --output-format=github --target-version py37 --select F,E4,E7,E9,W,I,D,UP,YTT,ANN,S,BLE,B,A,COM819,C4,T10,EM,EXE,ISC,ICN,G,PIE,PYI,Q,RSE,RET,SLF,SLOT,SIM,TID,TC,ARG,PGH,PL,TRY,FLY,PERF,FURB,LOG,RUF --preview --ignore W191,D211,D213,D401,PLR09,PLR1702,PLR2004,FURB101,FURB167,RUF001,RUF002,RUF003,RUF023 . run: ruff check --output-format=github .
continue-on-error: true continue-on-error: true
Python: Python:
@@ -83,8 +82,6 @@ jobs:
include: include:
- os: ubuntu-22.04 - os: ubuntu-22.04
python-version: "3.7" python-version: "3.7"
- os: ubuntu-20.04
python-version: "3.6"
fail-fast: false fail-fast: false
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View File

@@ -1,4 +1,4 @@
// Teal Dulcet, CS546 // Copyright © Teal Dulcet
// Compile: g++ -std=gnu++17 -Wall -g -O3 graphs.cpp -o graphs // Compile: g++ -std=gnu++17 -Wall -g -O3 graphs.cpp -o graphs

View File

@@ -1,9 +1,6 @@
// Teal Dulcet, CS546 // Copyright © Teal Dulcet
#pragma once #pragma once
#include <bitset>
#include <cassert>
#include <iostream> #include <iostream>
#include <memory>
#include <sstream> #include <sstream>
#include <cstring> #include <cstring>
#include <cmath> #include <cmath>
@@ -57,7 +54,7 @@ namespace graphs
// {" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "} // No border // {" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "} // No border
}; };
enum color_type: uint8_t enum color_type
{ {
color_default, color_default,
color_black, color_black,
@@ -815,153 +812,6 @@ namespace graphs
return 0; return 0;
} }
// EXPERIMENTAL BEG
// Using the existing color_type enum for the 4-bit colors (not using std::variant due to its larger size)
union Color {
color_type col_4; // 4-bit color
uint8_t col_8; // 8-bit color
struct {
uint8_t red;
uint8_t green;
uint8_t blue;
} col_24; // 24-bit true color
};
enum class ColorBits: uint8_t { e4, e8, e24 };
// Intermediate fragment representation potentially holding multiple pixels (e.g. 2x4 as braille)
// most optimal representation possible with only 4 bytes in size, applicable for all types of characters
struct Fragment {
Color color;
uint8_t data; // stores up to 8 data points or up to 255 values
};
// store fragments on temporary buffer to pass between draws
using Texture = std::vector<Fragment>;
struct Axis {
long double min = 0;
long double max = 0;
bool drawn = true;
bool labels = true;
bool ticks = true;
bool units_label = true;
units_type units = units_fracts;
};
struct Options {
size_t width = 0; // Width in terminal characters. Set to 0 for automatic size based on terminal.
size_t height = 0; // Height in terminal characters. Set to 0 for automatic size based on terminal.
Axis x = {};
Axis y = {};
type_type character_set = type_braille;
plot_type plot = plot_scatter;
style_type style = style_light;
graph_type graph = graph_dot;
std::string title;
std::ostream &ostr = std::cout;
ColorBits color_type = ColorBits::e4; // bit depth of color representation
bool check = true; // validate sizes for graph draw
bool border = false; // draw border around the graph
bool draw_immediately = true; // draw graph immediately after creation. otherwise call draw/graph with the returned texture
};
// intermediate representation of a graph texture for ease of passing around
struct Intermediate {
// use a graph texture to draw into the terminal
inline void draw() {
// draw graph for experimental preview purposes only
for (size_t y = 0; y < options.height; y++) {
for (size_t x = 0; x < options.width; x++) {
const size_t index = x + y * options.width;
const auto& frag = texture[index];
// begin color draw(
cout << outputcolor(frag.color.col_4);
// draw character
switch (options.character_set) {
case type_braille:
cout << dots[frag.data];
break;
case type_block_quadrant:
cout << blocks_quadrant[frag.data];
break;
default: break;
}
// reset color (TODO: could be optimized to only reset when color changes)
cout << outputcolor(color_type::color_default);
}
cout << '\n';
}
}
Texture texture;
const Options options;
};
// plot from single data set, drawn on top of existing graph
template <typename T>
void plot_experimental(const T &data, Intermediate &intermediate, Color color = {color_red}) {
cout << "Experimental plot\n";
// precalc spans
const Options& options = intermediate.options;
const long double x_span = options.x.max - options.x.min;
const long double y_span = options.y.max - options.y.min;
const long double x_span_recip = 1.0 / x_span;
const long double y_span_recip = 1.0 / y_span;
// insert draw plot data into texture
for (const auto [x, y]: data) {
// check if value is between limits
if (x >= options.x.min && x < options.x.max && y >= options.y.min && y < options.y.max) {
// calculate terminal character position
const long double x_term = ((long double)x - options.x.min) * x_span_recip * (long double)options.width;
const long double y_term = ((long double)y - options.y.min) * y_span_recip * (long double)options.height;
// calculate sub-fragment position (2x4 for braille)
const auto [char_width, char_height] = densities[options.character_set];
size_t x_sub = (x_term - std::floor(x_term)) * char_width;
size_t y_sub = (y_term - std::floor(y_term)) * char_height;
// invert y_sub
y_sub = char_height - 1 - y_sub;
// draw Fragment
const size_t index = (size_t)x_term + (options.height - 1 - (size_t)y_term) * options.width;
intermediate.texture[index].color = color; // TODO: mix color here
uint8_t value = 0;
// TODO: put this in separate function to reuse in other plot funcs
switch (options.character_set) {
case type_braille:
value = dotvalues[x_sub][y_sub];
break;
case type_block_quadrant:
value = 1 << (x_sub + y_sub * char_width);
break;
default: break;
}
intermediate.texture[index].data |= value;
}
}
// draw plot into terminal immediately if requested
if (options.draw_immediately) {
intermediate.draw();
}
}
// plot from single data set
template <typename T>
auto plot_experimental(const T &data, const Options &options = {}, Color color = {color_red}) -> Intermediate {
cout << "Experimental plot\n";
// create new intermediate object for texture and options
assert(options.width > 0 && options.height > 0); // enforce valid size for now
Intermediate intermediate = { Texture(options.width * options.height), options };
plot_experimental(data, intermediate, color);
return intermediate;
}
// EXPERIMENTAL END
template <typename T> template <typename T>
int histogram(size_t height, size_t width, long double xmin, long double xmax, long double ymin, long double ymax, const T &aarray, const options &aoptions = {}) int histogram(size_t height, size_t width, long double xmin, long double xmax, long double ymin, long double ymax, const T &aarray, const options &aoptions = {})
{ {

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# Teal Dulcet, CS546 # Copyright © Teal Dulcet
# Run: python3 -OO . # Run: python3 -OO .

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# Teal Dulcet, CS546 # Copyright © Teal Dulcet
import locale import locale
import math import math
@@ -77,7 +77,6 @@ class color_types(IntEnum):
colors = (39, 30, 31, 32, 33, 34, 35, 36, 37, 90, 91, 92, 93, 94, 95, 96, 97) colors = (39, 30, 31, 32, 33, 34, 35, 36, 37, 90, 91, 92, 93, 94, 95, 96, 97)
# fmt: off
dots = ( dots = (
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
@@ -96,23 +95,22 @@ dots = (
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"") "") # fmt: skip
dotvalues = ((0x1, 0x2, 0x4, 0x40), (0x8, 0x10, 0x20, 0x80)) dotvalues = ((0x1, 0x2, 0x4, 0x40), (0x8, 0x10, 0x20, 0x80))
blocks = ("\xA0", "") blocks = ("\xA0", "") # fmt: skip
blocks_quadrant = ("\xA0", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "") blocks_quadrant = ("\xa0", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "")
separated_blocks_quadrant = ("\xA0", "𜰡", "𜰢", "𜰣", "𜰤", "𜰥", "𜰦", "𜰧", "𜰨", "𜰩", "𜰪", "𜰫", "𜰬", "𜰭", "𜰮", "𜰯") separated_blocks_quadrant = ("\xa0", "𜰡", "𜰢", "𜰣", "𜰤", "𜰥", "𜰦", "𜰧", "𜰨", "𜰩", "𜰪", "𜰫", "𜰬", "𜰭", "𜰮", "𜰯")
blocks_sextant = ("\xA0", "🬀", "🬁", "🬂", "🬃", "🬄", "🬅", "🬆", "🬇", "🬈", "🬉", "🬊", "🬋", "🬌", "🬍", "🬎", "🬏", "🬐", "🬑", "🬒", "🬓", "", "🬔", "🬕", "🬖", "🬗", "🬘", "🬙", "🬚", "🬛", "🬜", "🬝", "🬞", "🬟", "🬠", "🬡", "🬢", "🬣", "🬤", "🬥", "🬦", "🬧", "", "🬨", "🬩", "🬪", "🬫", "🬬", "🬭", "🬮", "🬯", "🬰", "🬱", "🬲", "🬳", "🬴", "🬵", "🬶", "🬷", "🬸", "🬹", "🬺", "🬻", "") blocks_sextant = ("\xA0", "🬀", "🬁", "🬂", "🬃", "🬄", "🬅", "🬆", "🬇", "🬈", "🬉", "🬊", "🬋", "🬌", "🬍", "🬎", "🬏", "🬐", "🬑", "🬒", "🬓", "", "🬔", "🬕", "🬖", "🬗", "🬘", "🬙", "🬚", "🬛", "🬜", "🬝", "🬞", "🬟", "🬠", "🬡", "🬢", "🬣", "🬤", "🬥", "🬦", "🬧", "", "🬨", "🬩", "🬪", "🬫", "🬬", "🬭", "🬮", "🬯", "🬰", "🬱", "🬲", "🬳", "🬴", "🬵", "🬶", "🬷", "🬸", "🬹", "🬺", "🬻", "") # fmt: skip
separated_blocks_sextant = ("\xA0", "𜹑", "𜹒", "𜹓", "𜹔", "𜹕", "𜹖", "𜹗", "𜹘", "𜹙", "𜹚", "𜹛", "𜹜", "𜹝", "𜹞", "𜹟", "𜹠", "𜹡", "𜹢", "𜹣", "𜹤", "𜹥", "𜹦", "𜹧", "𜹨", "𜹩", "𜹪", "𜹫", "𜹬", "𜹭", "𜹮", "𜹯", "𜹰", "𜹱", "𜹲", "𜹳", "𜹴", "𜹵", "𜹶", "𜹷", "𜹸", "𜹹", "𜹺", "𜹻", "𜹼", "𜹽", "𜹾", "𜹿", "𜺀", "𜺁", "𜺂", "𜺃", "𜺄", "𜺅", "𜺆", "𜺇", "𜺈", "𜺉", "𜺊", "𜺋", "𜺌", "𜺍", "𜺎", "𜺏") separated_blocks_sextant = ("\xA0", "𜹑", "𜹒", "𜹓", "𜹔", "𜹕", "𜹖", "𜹗", "𜹘", "𜹙", "𜹚", "𜹛", "𜹜", "𜹝", "𜹞", "𜹟", "𜹠", "𜹡", "𜹢", "𜹣", "𜹤", "𜹥", "𜹦", "𜹧", "𜹨", "𜹩", "𜹪", "𜹫", "𜹬", "𜹭", "𜹮", "𜹯", "𜹰", "𜹱", "𜹲", "𜹳", "𜹴", "𜹵", "𜹶", "𜹷", "𜹸", "𜹹", "𜹺", "𜹻", "𜹼", "𜹽", "𜹾", "𜹿", "𜺀", "𜺁", "𜺂", "𜺃", "𜺄", "𜺅", "𜺆", "𜺇", "𜺈", "𜺉", "𜺊", "𜺋", "𜺌", "𜺍", "𜺎", "𜺏") # fmt: skip
blocks_octant = ("\xA0", "𜺨", "𜺫", "🮂", "𜴀", "", "𜴁", "𜴂", "𜴃", "𜴄", "", "𜴅", "𜴆", "𜴇", "𜴈", "", "𜴉", "𜴊", "𜴋", "𜴌", "🯦", "𜴍", "𜴎", "𜴏", "𜴐", "𜴑", "𜴒", "𜴓", "𜴔", "𜴕", "𜴖", "𜴗", "𜴘", "𜴙", "𜴚", "𜴛", "𜴜", "𜴝", "𜴞", "𜴟", "🯧", "𜴠", "𜴡", "𜴢", "𜴣", "𜴤", "𜴥", "𜴦", "𜴧", "𜴨", "𜴩", "𜴪", "𜴫", "𜴬", "𜴭", "𜴮", "𜴯", "𜴰", "𜴱", "𜴲", "𜴳", "𜴴", "𜴵", "🮅", "𜺣", "𜴶", "𜴷", "𜴸", "𜴹", "𜴺", "𜴻", "𜴼", "𜴽", "𜴾", "𜴿", "𜵀", "𜵁", "𜵂", "𜵃", "𜵄", "", "𜵅", "𜵆", "𜵇", "𜵈", "", "𜵉", "𜵊", "𜵋", "𜵌", "", "𜵍", "𜵎", "𜵏", "𜵐", "", "𜵑", "𜵒", "𜵓", "𜵔", "𜵕", "𜵖", "𜵗", "𜵘", "𜵙", "𜵚", "𜵛", "𜵜", "𜵝", "𜵞", "𜵟", "𜵠", "𜵡", "𜵢", "𜵣", "𜵤", "𜵥", "𜵦", "𜵧", "𜵨", "𜵩", "𜵪", "𜵫", "𜵬", "𜵭", "𜵮", "𜵯", "𜵰", "𜺠", "𜵱", "𜵲", "𜵳", "𜵴", "𜵵", "𜵶", "𜵷", "𜵸", "𜵹", "𜵺", "𜵻", "𜵼", "𜵽", "𜵾", "𜵿", "𜶀", "𜶁", "𜶂", "𜶃", "𜶄", "𜶅", "𜶆", "𜶇", "𜶈", "𜶉", "𜶊", "𜶋", "𜶌", "𜶍", "𜶎", "𜶏", "", "𜶐", "𜶑", "𜶒", "𜶓", "", "𜶔", "𜶕", "𜶖", "𜶗", "", "𜶘", "𜶙", "𜶚", "𜶛", "", "𜶜", "𜶝", "𜶞", "𜶟", "𜶠", "𜶡", "𜶢", "𜶣", "𜶤", "𜶥", "𜶦", "𜶧", "𜶨", "𜶩", "𜶪", "𜶫", "", "𜶬", "𜶭", "𜶮", "𜶯", "𜶰", "𜶱", "𜶲", "𜶳", "𜶴", "𜶵", "𜶶", "𜶷", "𜶸", "𜶹", "𜶺", "𜶻", "𜶼", "𜶽", "𜶾", "𜶿", "𜷀", "𜷁", "𜷂", "𜷃", "𜷄", "𜷅", "𜷆", "𜷇", "𜷈", "𜷉", "𜷊", "𜷋", "𜷌", "𜷍", "𜷎", "𜷏", "𜷐", "𜷑", "𜷒", "𜷓", "𜷔", "𜷕", "𜷖", "𜷗", "𜷘", "𜷙", "𜷚", "", "𜷛", "𜷜", "𜷝", "𜷞", "", "𜷟", "𜷠", "𜷡", "𜷢", "", "𜷣", "", "𜷤", "𜷥", "") blocks_octant = ("\xA0", "𜺨", "𜺫", "🮂", "𜴀", "", "𜴁", "𜴂", "𜴃", "𜴄", "", "𜴅", "𜴆", "𜴇", "𜴈", "", "𜴉", "𜴊", "𜴋", "𜴌", "🯦", "𜴍", "𜴎", "𜴏", "𜴐", "𜴑", "𜴒", "𜴓", "𜴔", "𜴕", "𜴖", "𜴗", "𜴘", "𜴙", "𜴚", "𜴛", "𜴜", "𜴝", "𜴞", "𜴟", "🯧", "𜴠", "𜴡", "𜴢", "𜴣", "𜴤", "𜴥", "𜴦", "𜴧", "𜴨", "𜴩", "𜴪", "𜴫", "𜴬", "𜴭", "𜴮", "𜴯", "𜴰", "𜴱", "𜴲", "𜴳", "𜴴", "𜴵", "🮅", "𜺣", "𜴶", "𜴷", "𜴸", "𜴹", "𜴺", "𜴻", "𜴼", "𜴽", "𜴾", "𜴿", "𜵀", "𜵁", "𜵂", "𜵃", "𜵄", "", "𜵅", "𜵆", "𜵇", "𜵈", "", "𜵉", "𜵊", "𜵋", "𜵌", "", "𜵍", "𜵎", "𜵏", "𜵐", "", "𜵑", "𜵒", "𜵓", "𜵔", "𜵕", "𜵖", "𜵗", "𜵘", "𜵙", "𜵚", "𜵛", "𜵜", "𜵝", "𜵞", "𜵟", "𜵠", "𜵡", "𜵢", "𜵣", "𜵤", "𜵥", "𜵦", "𜵧", "𜵨", "𜵩", "𜵪", "𜵫", "𜵬", "𜵭", "𜵮", "𜵯", "𜵰", "𜺠", "𜵱", "𜵲", "𜵳", "𜵴", "𜵵", "𜵶", "𜵷", "𜵸", "𜵹", "𜵺", "𜵻", "𜵼", "𜵽", "𜵾", "𜵿", "𜶀", "𜶁", "𜶂", "𜶃", "𜶄", "𜶅", "𜶆", "𜶇", "𜶈", "𜶉", "𜶊", "𜶋", "𜶌", "𜶍", "𜶎", "𜶏", "", "𜶐", "𜶑", "𜶒", "𜶓", "", "𜶔", "𜶕", "𜶖", "𜶗", "", "𜶘", "𜶙", "𜶚", "𜶛", "", "𜶜", "𜶝", "𜶞", "𜶟", "𜶠", "𜶡", "𜶢", "𜶣", "𜶤", "𜶥", "𜶦", "𜶧", "𜶨", "𜶩", "𜶪", "𜶫", "", "𜶬", "𜶭", "𜶮", "𜶯", "𜶰", "𜶱", "𜶲", "𜶳", "𜶴", "𜶵", "𜶶", "𜶷", "𜶸", "𜶹", "𜶺", "𜶻", "𜶼", "𜶽", "𜶾", "𜶿", "𜷀", "𜷁", "𜷂", "𜷃", "𜷄", "𜷅", "𜷆", "𜷇", "𜷈", "𜷉", "𜷊", "𜷋", "𜷌", "𜷍", "𜷎", "𜷏", "𜷐", "𜷑", "𜷒", "𜷓", "𜷔", "𜷕", "𜷖", "𜷗", "𜷘", "𜷙", "𜷚", "", "𜷛", "𜷜", "𜷝", "𜷞", "", "𜷟", "𜷠", "𜷡", "𜷢", "", "𜷣", "", "𜷤", "𜷥", "") # fmt: skip
bars = ("\xA0", "", "", "", "", "", "", "", "") bars = ("\xa0", "", "", "", "", "", "", "", "")
# fmt: on
class type_types(IntEnum): class type_types(IntEnum):

79
python/pyproject.toml Normal file
View File

@@ -0,0 +1,79 @@
[tool.ruff]
line-length = 132 # 88
indent-width = 4
target-version = "py37"
preview = true
output-format = "concise"
[tool.ruff.lint]
select = [
"F",
"E4",
"E7",
"E9",
"W",
"I",
"D",
"UP",
"YTT",
"ANN",
"S",
"BLE",
"B",
"A",
"COM819",
"C4",
"T10",
"EM",
"EXE",
"ISC",
"ICN",
"G",
"PIE",
"PYI",
"Q",
"RSE",
"RET",
"SLF",
"SLOT",
"SIM",
"TID",
"TC",
"ARG",
"PGH",
"PL",
"TRY",
"FLY",
"PERF",
"FURB",
"LOG",
"RUF"
]
ignore = [
"W191",
"D211",
"D213",
"D401",
"PLR09",
"PLR1702",
"PLR2004",
"FURB101",
"FURB167",
"RUF001",
"RUF002",
"RUF003",
"RUF023"
]
[tool.ruff.lint.isort]
split-on-trailing-comma = false
[tool.ruff.format]
quote-style = "double"
indent-style = "tab"
skip-magic-trailing-comma = true

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# Teal Dulcet, CS546 # Copyright © Teal Dulcet
import locale import locale
import re import re

View File

@@ -1,4 +1,4 @@
// Teal Dulcet, CS546 // Copyright © Teal Dulcet
// Compile: g++ -std=gnu++17 -Wall -g -O3 tables.cpp -o tables // Compile: g++ -std=gnu++17 -Wall -g -O3 tables.cpp -o tables

View File

@@ -1,4 +1,4 @@
// Teal Dulcet, CS546 // Copyright © Teal Dulcet
#pragma once #pragma once
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>