<commit_before>import pytest

from sectionproperties.analysis.section import Section
import sectionproperties.pre.library.primitive_sections as sections
from sectionproperties.pre.pre import Material

def test_rectangle():
    fy = 500
    E = 200e3
    b = 50
    d = 100

    steel = Material(
        name="Steel",
        elastic_modulus=E,
        poissons_ratio=0.3,
        yield_strength=fy,
        density=8.05e-6,
        color="grey",
    )

    Sx = b*d**2/4
    Mp = Sx * fy

    geom_mat = sections.rectangular_section(d=d, b=b, material=steel)
    geom_nomat = sections.rectangular_section(d=d, b=b)

    geom_mat.create_mesh(mesh_sizes=[2.5])
    geom_nomat.create_mesh(mesh_sizes=[2.5])

    sec_mat = Section(geom_mat)
    sec_nomat = Section(geom_nomat)

    sec_mat.calculate_geometric_properties()
    sec_mat.calculate_plastic_properties()

    sec_nomat.calculate_geometric_properties()
    sec_nomat.calculate_plastic_properties()

    assert sec_nomat.get_s()[0] == pytest.approx(Sx)
    assert sec_mat.get_s()[0] == pytest.approx(Mp)
    assert sec_mat.get_s()[0]/fy == sec_nomat.get_s()[0]
<commit_msg>Lint with black<commit_after>import pytest

from sectionproperties.analysis.section import Section
import sectionproperties.pre.library.primitive_sections as sections
from sectionproperties.pre.pre import Material


def test_rectangle():
    fy = 500
    E = 200e3
    b = 50
    d = 100

    steel = Material(
        name="Steel",
        elastic_modulus=E,
        poissons_ratio=0.3,
        yield_strength=fy,
        density=8.05e-6,
        color="grey",
    )

    Sx = b * d * d / 4
    Mp = Sx * fy

    geom_mat = sections.rectangular_section(d=d, b=b, material=steel)
    geom_nomat = sections.rectangular_section(d=d, b=b)

    geom_mat.create_mesh(mesh_sizes=[2.5])
    geom_nomat.create_mesh(mesh_sizes=[2.5])

    sec_mat = Section(geom_mat)
    sec_nomat = Section(geom_nomat)

    sec_mat.calculate_geometric_properties()
    sec_mat.calculate_plastic_properties()

    sec_nomat.calculate_geometric_properties()
    sec_nomat.calculate_plastic_properties()

    assert sec_nomat.get_s()[0] == pytest.approx(Sx)
    assert sec_mat.get_s()[0] == pytest.approx(Mp)
    assert sec_mat.get_s()[0] / fy == sec_nomat.get_s()[0]
{'fraction_non_alphanumeric': 0.11150286469810489, 'fraction_numerical': 0.024239753195240195, 'mean_word_length': 3.4597249508840866, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1675324', 'n_tokens_mistral': 875, 'n_tokens_neox': 824, 'n_words': 132}