Skip to content

Commit 255feb1

Browse files
committed
chore: fix prettier
1 parent 1a2c39d commit 255feb1

File tree

5 files changed

+21
-13
lines changed

5 files changed

+21
-13
lines changed
Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
export default function getMoleculeCreators(OCL) {
2-
const fields = new Map([['oclid', OCL.Molecule.fromIDCode], ['idcode', OCL.Molecule.fromIDCode], ['smiles', OCL.Molecule.fromSmiles], ['molfile', OCL.Molecule.fromMolfile], ['smarts', (smarts) => {
3-
const smilesParser = new OCL.SmilesParser({ smartsMode: 'smarts' });
4-
return smilesParser.parseMolecule(smarts);
5-
}]]);
6-
2+
const fields = new Map([
3+
['oclid', OCL.Molecule.fromIDCode],
4+
['idcode', OCL.Molecule.fromIDCode],
5+
['smiles', OCL.Molecule.fromSmiles],
6+
['molfile', OCL.Molecule.fromMolfile],
7+
[
8+
'smarts',
9+
(smarts) => {
10+
const smilesParser = new OCL.SmilesParser({ smartsMode: 'smarts' });
11+
return smilesParser.parseMolecule(smarts);
12+
},
13+
],
14+
]);
715

816
return fields;
917
}

src/fragment/fragmentAcyclicSingleBonds.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export function fragmentAcyclicSingleBonds(molecule) {
4141
const nbFragments = brokenMolecule.getFragmentNumbers(fragmentMap);
4242
const results = [];
4343
for (let i = 0; i < nbFragments; i++) {
44-
const result = { atomMap: [],};
44+
const result = { atomMap: [] };
4545
const includeAtom = fragmentMap.map((id) => {
4646
return id === i;
4747
});

src/path/getAllAtomsPaths.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function getAllAtomsPaths(
3131
const oneAtomPaths: AtomPath[][] = [];
3232
allAtomsPaths.push(oneAtomPaths);
3333

34-
let atomPaths: AtomPath[] = [ { path: [i], pathLength: 0 }];
34+
let atomPaths: AtomPath[] = [{ path: [i], pathLength: 0 }];
3535
oneAtomPaths.push(atomPaths);
3636

3737
let nextIndexes = [0];

src/topic/__tests__/TopicMolecule.getAtomPathsFrom.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ test('TopicMolecule.getAtomPathsFrom maxPathLength: 2 and ask for 3', () => {
2323
const molecule = Molecule.fromSmiles('CCCO');
2424
const topicMolecule = new TopicMolecule(molecule, { maxPathLength: 2 });
2525

26-
expect(() => topicMolecule.getAtomPathsFrom(0, { maxPathLength: 3 })).toThrowError(
27-
'The maxPathLength is too long',
28-
);
26+
expect(() =>
27+
topicMolecule.getAtomPathsFrom(0, { maxPathLength: 3 }),
28+
).toThrowError('The maxPathLength is too long');
2929
});
3030

3131
test('TopicMolecule.getAtomPathsFrom maxPathLength: 2 and filter H', () => {

src/util/__tests__/getMolfilesMapping.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ test('testing with and without hydrogens', () => {
100100
methaneMolecule.addImplicitHydrogens();
101101
const methaneWithHydrogens = methaneMolecule.toMolfile();
102102

103-
expect(() => getMolfilesMapping(OCL, methane, methaneWithHydrogens)).toThrowError(
104-
'Molecules do not have the same explicit hydrogens',
105-
);
103+
expect(() =>
104+
getMolfilesMapping(OCL, methane, methaneWithHydrogens),
105+
).toThrowError('Molecules do not have the same explicit hydrogens');
106106
});

0 commit comments

Comments
 (0)