<commit_before>from __future__ import print_function, division, absolute_import
import weakref
from copy import deepcopy

from robofab.pens.pointPen import AbstractPointPen
from defcon.pens.clockwiseTestPointPen import ClockwiseTestPointPen

from .booleanOperationManager import BooleanOperationManager

manager = BooleanOperationManager()


class BooleanGlyphDataPointPen(AbstractPointPen):

    def __init__(self, glyph):
        self._glyph = glyph
        self._points = []
        self.copyContourData = True

    def _flushContour(self):
        points = self._points
        if len(points) == 1 and points[0][0] == "move":
            self._glyph.anchors.append((pt, name))<commit_msg>flush anchors correctly<commit_after>from __future__ import print_function, division, absolute_import
import weakref
from copy import deepcopy

from robofab.pens.pointPen import AbstractPointPen
from defcon.pens.clockwiseTestPointPen import ClockwiseTestPointPen

from .booleanOperationManager import BooleanOperationManager

manager = BooleanOperationManager()


class BooleanGlyphDataPointPen(AbstractPointPen):

    def __init__(self, glyph):
        self._glyph = glyph
        self._points = []
        self.copyContourData = True

    def _flushContour(self):
        points = self._points
        if len(points) == 1 and points[0][0] == "move":
            segmentType, pt, smooth, name = points[0]
            self._glyph.anchors.append((pt, name))
{'fraction_non_alphanumeric': 0.0787292817679558, 'fraction_numerical': 0.004834254143646409, 'mean_word_length': 4.013840830449827, 'pattern_counts': {'":': 2, '<': 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': '350129', 'n_tokens_mistral': 409, 'n_tokens_neox': 389, 'n_words': 102}